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?
request.locale does not work, since it does not reflect the changes done via “?lang=xx“
Within your controller you can obtain the locale using the
RequestContextUtils.Then to resolve the locale for the request: