Changing Locales and docs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing Locales and docs

basejump (Josh)
Sec 10.2 says
"Grails will automatically switch the user's locale and store it in a cookie so subsequent requests will have the new header."

I was digging through the code and just wanted to make sure I am not missing something. It looks like ParamsAwareLocaleChangeInterceptor calls localeResolver?.setLocale which is a SessionLocaleResolver and sets WebUtils.setSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME, locale)

Am I correct in that it should "technically"  say
"Grails will automatically switch the user's locale and store it in the cookie session so subsequent requests will have the new header."

Again, I'm not nit picking, just making sure I am understanding this so I can get our Executor/Quartz job threads setup properly with MockRequests and a proper Locale for the job
Reply | Threaded
Open this post in threaded view
|

Re: Changing Locales and docs

pledbrook
Hi Josh,

> Sec 10.2 says
> "Grails will automatically switch the user's locale and store it in a cookie
> so subsequent requests will have the new header."
>
> I was digging through the code and just wanted to make sure I am not missing
> something. It looks like ParamsAwareLocaleChangeInterceptor
> calls localeResolver?.setLocale which is a SessionLocaleResolver and
> sets WebUtils.setSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME,
> locale)
>
> Am I correct in that it should "technically"  say
> "Grails will automatically switch the user's locale and store it in
> the cookie session so subsequent requests will have the new header."
>
> Again, I'm not nit picking, just making sure I am understanding this so I
> can get our Executor/Quartz job threads setup properly with MockRequests and
> a proper Locale for the job

This is really a question for the user thread. But yes, the docs
should say that the user's locale is stored in the session, which is
of course tied to a session cookie.

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Changing Locales and docs

basejump (Josh)
Thanks for the clarification, I thought that since it was dealing with grails source code and the resulting docs it belonged on the dev list.


On Jan 19, 2012, at 4:31 AM, Peter Ledbrook wrote:

This is really a question for the user thread. But yes, the docs
should say that the user's locale is stored in the session, which is
of course tied to a session cookie.

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email