[opencms-dev] CmsProperty class the correct choice to set a property?

Christian Steinert christian_steinert at web.de
Sat Sep 2 11:12:26 CEST 2006


Jan Meier schrieb:
> Hi Christian,
>
> Am Donnerstag 31 August 2006 02:39 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? 
>
> Regards 
>
> Jan
>   
Ok, I understand the problem, but I must say that I don't know an
elegant solution.
The only (and un-elegant) solution that comes to my mind would be to do
a redirect inside of your JSP-template.

Whenever you get locale=xx or lang=xx or whatever, then you do a
redirect to the same page with the parameter __locale=xx.

I know that it's not terribly beautiful, but I don't know any proper way
to do it.

christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060902/3b2916d8/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/3b2916d8/attachment.bin>


More information about the opencms-dev mailing list