[opencms-dev] Localisation question

Thomas Maerz thomasmaerz at gmx.de
Fri Oct 8 16:36:48 CEST 2004


Robert Petermeier <robert2.0 at gmx.de> writes:

> What is the best way to set the selected locale/encoding globally? By
> 'globally' I mean that the setting is accessible for all modules that
> are used during the session. Simply appending '__locale=...' to every
> subsequent request doesn't seem to be the best solution.

You can put the locale into the user's session and can then use
CmsJspActionElement#getMessages(String bundleName, String language).

But I am having a problem with XmlPage. I can't see any simple way to
set the locale for a user explicitly, since CmsLocaleManager wants to
select the locale. 

Is the only place to set this the CmsXmlPageLoader#service() method?






More information about the opencms-dev mailing list