Solved the problem by overriding the service LocalizationSetter.
I am building a pretty simple registration page and already had to overwrite
2 services. This is a bit disapointing and shows the unmaturity of Tapestry
5... The first for getting rid of default javascript and css files added to
the page by Tapestry, and now for setting the Locale based on a cookie or
database value.
marcanti wrote:
>
> I see that the locale is stored in the URL... But in my case I need it to
> work without the locale being stored in the URL, is there an easy way of
> doing this?
>
> I have tryed the service LocalizationSetter.setLocaleFromLocaleName(), but
> that dont work either.
>
>
> marcanti wrote:
>>
>> I want to change the locale based on a language code retrieved from a
>> cookie, so I am doing the following:
>>
>> public void setupRender() {
>> .....
>> language = cookie.getValue();
>> persistentLocale.set(new Locale(language));
>> }
>>
>> The above is not working. The messages on the page stays the same and
>> when reloading the page the locale is reset to the default locale. What
>> am I doing wrong here?
>>
>> I have checked that the locale is set correclty on persistentLocale using
>> persistentLocale.get().getLanguage(). I also noticed that tapestry dont
>> set any cookies, so were is the locale persisted, in the session or what?
>> And why is the locale set back to the default value?
>>
>
>
--
View this message in context:
http://www.nabble.com/Using-persistentLocale-to-change-page-locale-is-not-working-for-me.-tp24739247p24747686.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]