Hi!

I need to get the (supported) tapestry locale of my page in my page java
class. So first, i have set the locales in my AppModule:

configuration.add("tapestry.supported-locales", "en, de");

then, i give the user the opportunity to switch

void onActionFromDe(){
persistentLocale.set(Locale.GERMAN);
}
        
void onActionFromEn(){
persistentLocale.set(Locale.ENGLISH);           
}

but as long he doesnt switch, the http-request locale is mapped
automatically from tapestry to de or en within a page;

http://tapestry.apache.org/localization.html

what i need is to get the current (tapestry supported locale) of a page -
even if the user did not select a language.


persistentLocale.get() is null, as long as the user did not select a
language. Request r.getLocale() would give me any locale the user currently
has (so even unsupported tapestry locales, right?)

so, how can i get the actual tapestry locale used within a page? the only
hack would be to force the persistentLocale to set for each page..?

thx
 





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/getting-the-actual-tapestry-locale-tp5719764.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to