On Sunday 01 February 2009 12:02:19 Ignacio de Córdoba wrote:
> Thanks for your reply,
> I had read the i18n docs you refer but still find no info about changing
> the session locale inside an Action.
> Anyway, after reading the source of the Interceptor, I understand that
> doing:
>
> session.put(i18nInterceptor.DEFAULT_SESSION_ATTRIBUTE,myNewLocale);
>
> in my Action should change the locale in the session. Do you believe that's
> right and nothing extra needs to be done?
>


Sorry, I guess I wasn't clear, you also have to change it on the 
ActionContext...

ActionContext context = ActionContext.getContext();
context.setLocale(myNewLocale);

The setLocale method was moved to the ActionContext.

-Wes

-- 

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