[opencms-dev] CmsProperty class the correct choice to set a property?
Christian Steinert
christian_steinert at web.de
Sat Sep 2 11:01:36 CEST 2006
Jan Meier schrieb:
> Hi,
>
> Am Donnerstag 31 August 2006 16:06 schrieb Christian Steinert:
>
>>>> CmsProperty represents properties as they are stored in the database.
>>>> If you want to set the locale for one request only, then you could
>>>> append the __locale=xx parameter to your URL.
>>>>
>>> I know about the possibility to set the locale with __locale=xx, the
>>> problem is that it is hard to memorize. The people who edit pages in my
>>> OpenCms setup should create links to english content, for them it would
>>> be a lot easier if they just have to append locale=xx to the link url.
>>>
>>> You said that CmsProperty is not the right choice to set the locale, how
>>> can I set the locale within my jsp-code?
>>>
>> I would like to understand how your JSP would know which locale should be
>> used for a given request. Do you implement accept-language parsing or is
>> the language somehow related to the url?
>>
>
> The language should be set in the Query-String, for
> example /index.html?lang=de
>
> So that I can write:
>
> String lang = request.getParameter("lang");
>
> if (lang != null)
> if (lang.equals("de")) {
> // here should the locale be set
> }
>
> Regards
>
> Jan
>
But then i really don't understand it.
If you can append lang=xx to the URL, why is it so much different to
append __locale=xx?
A normal user will not append any of these parameters by hand, anyway.
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060902/bd564b90/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060902/bd564b90/attachment.bin>
More information about the opencms-dev
mailing list