struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject i18n algorithm and taglibs
Date Thu, 03 Aug 2006 09:14:57 GMT
I am writing a taglib at the moment to do some complex display logic and I need 
to get at the message resources.

Please correct me if I am wrong but it seems that under some circumstances there 
can be different Locales (or sub-locales) available from different places in the 
servlet container and additional frameworks.

The JSTL spec (as reflected in the code) has a fairly involved algorithm for 
determining which locale suits best, or better said, which 
ApplicationResources.properties files suits best.

Is this same algorithm used by the struts MessageResources?

I found 3 places where the locale can be retrieved:
(1) request.getLocale()
(2) action.getLocale()
(3) JSTL fmt:message finds its locale but doesnt make it available

In the taglib that I'm writing which for various reasons has to extend 
BodyTagSupport and not the Struts BaseHandlerTag or other.

Will I be OK with the request.getLocale() locale?


Thanks
Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message