thomers thomers - 1 year ago 101
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 "

Answer Source

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

import as RCU

Then to resolve the locale for the request:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download