/book/list?lang=es
16.2 Changing Locales
Version: 3.3.8
16.2 Changing Locales
By default the user locale is detected from the incoming Accept-Language
header. However, you can provide users the capability to switch locales by simply passing a parameter called lang
to Grails as a request parameter:
Grails will automatically switch the user’s locale and store it in a cookie so subsequent requests will have the new header.