You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Nadesan, Binu" <bn...@cincom.com> on 2004/11/04 15:37:39 UTC

Change locale.

Hi All,

Currently I have an application where in, when the user accesses the first
page of the web application. The Message Tool is able to display the page as
per the user's browser language settings.
After the user login, the application detects the locale of the user from
the database and should render the subsequent pages as per the locale
settings in the database.

How do I reset the locale in Velocitytools?

Regards...
Binu Nadesan.
(513) 612-2206.



Re: Change locale.

Posted by Shinobu Kawai <sh...@gmail.com>.
Hi  Binu,

> Currently I have an application where in, when the user accesses the first
> page of the web application. The Message Tool is able to display the page as
> per the user's browser language settings.
> After the user login, the application detects the locale of the user from
> the database and should render the subsequent pages as per the locale
> settings in the database.
> 
> How do I reset the locale in Velocitytools?
Put it in the HttpSession, under Globals.LOCALE_KEY.
    http://struts.apache.org/api/org/apache/struts/Globals.html#LOCALE_KEY
    http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/struts/StrutsUtils.html#getLocale(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpSession)

## It might help if this was documented somewhere...

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai <sh...@gmail.com>

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