[opencms-dev] Localisation question
Martin Kuba
makub at ics.muni.cz
Fri Oct 8 17:04:59 CEST 2004
Thomas Maerz wrote:
> 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?
The recommended way is to have one XmlPage as two "siblings"
in different folders, and the folders should have
different settings for "locale" property.
XmlPages then inherit the locale property from the folder.
So the user locale is selected by selecting the folder.
Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno Martin Kuba
Institute of Computer Science email: makub at ics.muni.cz
Masaryk University http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ mobil: +420-603-533775
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2847 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041008/43f91927/attachment.bin>
More information about the opencms-dev
mailing list