tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: Tiles2 Internationalization
Date Fri, 13 Jan 2012 15:52:41 GMT
2012/1/13 Nicolas LE BAS <mail@nlebas.net>

> Hi,
>
> Tiles uses the java.util.Locale object stored in the session under
> "org.apache.tiles.LOCALE".
> So you may try something like:
>    request.getSession().**setAttribute(
>        DefaultLocaleResolver.LOCALE_**KEY /*"org.apache.tiles.LOCALE"*/,
>        Locale.GERMANY );
>

Or you can override BasicTilesContainerFactory.createLocaleResolver:
http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createLocaleResolver(org.apache.tiles.TilesApplicationContext,
org.apache.tiles.context.TilesRequestContextFactory)
This way you could use the locale resolver (or whatever its name is) of
your webapp.

Antonio

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message