On Sunday 01 February 2009 12:10:00 Ignacio de Córdoba wrote:
> OK. Thanks again... after reading some other docs I'll be doing:
>
> ActionContext.getContext().setLocale(locale);
> session.put(com.opensymphony.xwork2.interceptor.I18nInterceptor.DEFAULT_SES
>SION_ATTRIBUTE,locale); session.put(Config.FMT_LOCALE, locale); //Also for
> JSTL, not only Struts.
> session.put("javax.servlet.jsp.jstl.fmt.locale.session", locale);//Just to
> be really sure
>
> (I hope this will "really" change locale)

The only question I have is what's wrong with leaving it up to the 
I18nInterceptor (setting the request_locale parameter)? If it's not fitting 
your needs, consider filing an improvement JIRA. It seems that other than 
setting it for JSTL, you are pretty much simply duplicating the logic of the 
interceptor.

Localization is often one of the things that I do not test as much as 
everything else. I personally don't have any apps that need properly 
localized. So, if you have a use-case that we should be considering, let us 
know so that we can make it work :)


-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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

Reply via email to