[opencms-dev] LocaleHandler implementation

Robert Petermeier robert2.0 at gmx.de
Thu Nov 25 16:28:36 CET 2004


Hi everyone,

I've attached our alternative implementation of I_CmsLocaleHandler. It 
works as follows:

- If a request parameter "__setlocale" is present the locale specified
   in this parameter is stored in the session.

It then goes on to construct a CmsI18nInfo object. For this it looks up 
the user-selected locale in the session (under the key
"javax.servlet.jsp.jstl.fmt.locale.session" which is used by JSTL , too).

- If a locale is found in the session this locale is used.
- If no locale is found in the session, the HTTP request header is
   parsed and matched against the installed locales.
- If no matching locale is found then the default locale of OpenCms is
   used.


Comments are welcome.


Best regards,
Robert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SessionLocaleHandler.java
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041125/76a34d1e/attachment.ksh>


More information about the opencms-dev mailing list