tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tapestry Wiki] Update of "Tapestry5HowToChangeLocale" by ChristianKoeberl
Date Mon, 06 Aug 2007 17:19:10 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.

The following page has been changed by ChristianKoeberl:

New page:
Tapestry stores the locale of the current user in the !ThreadLocale service. This locale is
either determined by the HTTP header "Accept-Language" or the cookie "org.apache.tapestry.locale"
(both sent by the browser). The cookie has precedence.

For changing the locale you have to use the !PersistentLocale service and (re-)set the locale.

Here is an example with an !ActionLink with the id "changeLocale" (the language comes as the
private PersistentLocale persistentLocale;

public void onActionFromChangeLocale(String language)
	persistentLocale.set(new Locale(language));

See also [http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html T5 Localization

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message