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 Localization
Date Tue, 22 May 2007 18:06:50 GMT
2007/5/22, Todd Wilkinson <lp@dealsqueal.com>:
> I would like to be able to localize beyond just language and country.
> Ideally, I would like to have up to 3 additional criteria on which to
> localize - eg, state, county, etc.  Is this possible in tiles?

It's possible, but you have to code a bit :-)
You have to extend the UrlDefinitionFactory class and then configure it.
As an example, you can see Dimensions:
http://mutidimensions.sf.net/
You've got to download the trunk from the Subversion repository.
Notice that it probably won't build, but at least you'll get the point
:-)
http://mutidimensions.svn.sourceforge.net/mutidimensions/framework/trunk/

> I have viewed the tiles localization documentation page here :
> http://tiles.apache.org/tutorial/advanced/l10n.html
>
> I don't quite understand how tiles knows which convention to follow:

It follows the standard for Locales. See:
http://java.sun.com/developer/technicalArticles/Intl/IntlIntro/

> also, it is unclear to me how the runtime decides the locale to choose -
> ie, how does tiles know the locale of the request?

See DefaultLocaleResolver class for this:
http://tiles.apache.org/framework/apidocs/org/apache/tiles/locale/impl/DefaultLocaleResolver.html

HTH
Antonio

Mime
View raw message