thomers thomers - 4 months ago 22
Java Question

Retrieve active locale in Grails application

I know I can use the "lang" parameter to automatically change the current locale as described in the docs, but how do I track those changes, for example to update the language stored in the current user domain object?

does not work, since it does not reflect the changes done via "


Within your controller you can obtain the locale using the RequestContextUtils.

import as RCU

Then to resolve the locale for the request: