You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Kjeldahl Nilsson <tn...@marcello.no> on 2004/06/01 11:00:42 UTC
Multilingual website, text element lookup partially based on current
session\function.
Hello,
My project is working on a multi-language website using cocoon. The
multilingual aspect is implemented with a "language-cache" where we look
up and get all the text strings used visibly in our web pages (in other
words, we populate JXTemplate pages with data fetched from this
language-cache.)
What I need to do is this: I have a current cocoon session. I want to
pass the session id to a java class\method, which looks up appropiate
language strings, partially based on the current coccon request and\or
flowscript function. In other words, I want to retrieve the current http
request (or flowscript function) using only a reference to the current
session. Is this possible?
The point of doing this would be not having to pass a description of the
current page\flowscript function every time I access the language cache.
Any thoughts or suggestions on this?
regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Determining the current coccon\http request using current session
id?
Posted by Thomas Kjeldahl Nilsson <tn...@marcello.no>.
Restating an earlier question more generally:
I need to instantiate a java class. This class contains a reference to
the session that instantiated it. When methods in this class are called,
they should be able to reference the current http request \ or cocoon
flowscript function (for various reasons).
Is there a way to determine current httprequest or cocoon function,
based only on a reference to the current session?
(Regarding the orginal question: For some reasons we need to maintain
and access the language "dictionaries" for our project in a database,
not an xml dictionary as with i18n. So yes, my question still stands.. :)
-thomas
Joerg Heinicke wrote:
> On 01.06.2004 11:00, Thomas Kjeldahl Nilsson wrote:
>
>> My project is working on a multi-language website using cocoon. The
>> multilingual aspect is implemented with a "language-cache" where we
>> look up and get all the text strings used visibly in our web pages (in
>> other words, we populate JXTemplate pages with data fetched from this
>> language-cache.)
>>
>> What I need to do is this: I have a current cocoon session. I want to
>> pass the session id to a java class\method, which looks up appropiate
>> language strings, partially based on the current coccon request and\or
>> flowscript function. In other words, I want to retrieve the current
>> http request (or flowscript function) using only a reference to the
>> current session. Is this possible?
>>
>> The point of doing this would be not having to pass a description of
>> the current page\flowscript function every time I access the language
>> cache.
>>
>> Any thoughts or suggestions on this?
>
>
> Is there any requirement that makes it impossible to use Cocoon's i18n
> capabilities?
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Multilingual website, text element lookup partially based on
current session\function.
Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.06.2004 11:00, Thomas Kjeldahl Nilsson wrote:
> My project is working on a multi-language website using cocoon. The
> multilingual aspect is implemented with a "language-cache" where we look
> up and get all the text strings used visibly in our web pages (in other
> words, we populate JXTemplate pages with data fetched from this
> language-cache.)
>
> What I need to do is this: I have a current cocoon session. I want to
> pass the session id to a java class\method, which looks up appropiate
> language strings, partially based on the current coccon request and\or
> flowscript function. In other words, I want to retrieve the current http
> request (or flowscript function) using only a reference to the current
> session. Is this possible?
>
> The point of doing this would be not having to pass a description of the
> current page\flowscript function every time I access the language cache.
>
> Any thoughts or suggestions on this?
Is there any requirement that makes it impossible to use Cocoon's i18n
capabilities?
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org