cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <>
Subject Re: LangSelect, bug ?
Date Mon, 28 May 2001 07:24:25 GMT
> >
> > That is the one of the features that have to be implemented.
> > I am thinking of such sequence of language selection:
> >
> > 1. Check request for a param with a name 'lang' (if the user
> > choosed another
> > language manually).
> > 2. Lookup for a 'lang' cookie.
> > 3. Lookup for a session attribute 'lang'.
> > if none of this is succesful, then:
> > 4. Check the accept-languages header and select the first (supported by
> > application) language.
> > if no supported langs or no information in the header:
> > 5. Set the default language for the site (configured in the sitemap).
> > 6. or set English as the current language.
> I think the session should go before the cookie, so you can log in to a
> with a different languaje only for that session, without changing the
> default languaje for your future visits there.

Ok, agree.

So, are there any suggestions how that behavior can be controlled?
Is it a LangSelect's task to store the language in the session or in a
I've implemented some configuration possibilities for the LangSelect, but
I'm not sure that they can be very useful in the case, when lang for the
session differs from the lang in a cookie. Now the action can be used as

    <map:action name="lang-select"
        <!-- Should the action create a session to store the language
code. -->
        <!-- Should the action store the lang code in the session -->
        <!-- Should the action store the lang code in a cookie -->
            I am going to add other configuration params:
            cookie-age - the cookieAge attribute of the cookie with the lang
            param-name - the name of the request param, the session
attribute and the name of the cookie.
            Now it's hard coded and equals to 'lang'.

Maybe it's better to make these settings params, so for some pipelines thay
can be defined dynamicaly from the sitemap?

Btw, why the syntax for configuration and sitemap params are different? Why
not to use:
  <parameter name="create-session" value="true" />?

    Konstantin Piroumian.

To unsubscribe, e-mail:
For additional commands, email:

View raw message