Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Component/s: TagLib, View technologies
-
Labels:None
Description
Using
org.springframework.context.i18n.LocaleContextHolder.getLocale()
from a taglib inside a layout will only return "Accept-Language" locale information instead of the one configured by using any of the two options below
1. org.springframework.web.servlet.support.RequestContextUtils.getLocaleResolver(request).setLocale(request, response, new Locale(lang, country));
2. resources.groovy configuration as describe in the documentation
Referenced sites:
http://stackoverflow.com/questions/1569446/grails-how-to-change-the-current-locale
http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/web/servlet/LocaleResolver.html#setLocale%28javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse,%20java.util.Locale%29
http://tramuntanal.wikidot.com/grails#toc13
Test application provided.
(it is a 1.2.M2 version that can be upgraded to 1.2.2 and 1.3.RC1 as user needs)
Administrators, please update "component" attribute of the issue to:
taglib AND view technologies