Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SessionLocaleResolver's attribute name configurable [SPR-15450] #20011

spring-projects-issues opened this issue Apr 13, 2017 · 1 comment
in: web type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Apr 13, 2017

Mercy Ma opened SPR-15450 and commented

I used org.springframework.web.servlet.i18n.SessionLocaleResolver to resolve LocaleContext , and found the attribute name of HttpSession is a constant value ( String LOCALE_SESSION_ATTRIBUTE_NAME = SessionLocaleResolver.class.getName() + ".LOCALE";) , and it still can't be changed in latest version of Spring WebMVC, thus , Is possible to change the attribute name of HttpSession for SessionLocaleResolver ?

Affects: 4.3.7

Reference URL:

Issue Links:

  • #19748 CookieLocaleResolver may disturb error rendering when locale cookie has a malformed value
  • #19987 Revise AcceptHeaderLocaleResolver default locale handling

Referenced from: commits cec36fe, 421fabb

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 13, 2017

Juergen Hoeller commented

Good point! I've introduced corresponding setLocaleAttributeName and setTimeZoneAttributeName methods on SessionLocaleResolver, allowing for customization, and will backport those to 4.3.8 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web type: enhancement
None yet

No branches or pull requests

2 participants