Closed
Description
Oliver Drotbohm opened SPR-14312 and commented
It would be cool if AcceptHeaderLocaleResolver
would allow configuring a default Locale
just as CookieLocaleResolver
does. The use case is that I'd like to allow clients to explicit request a certain local but at the same time make sure that a well-defined default is used, independently of the system language (to prevent different deployment locations from changing the default).
It looks like we'd have to check whether the Accept-Language
header is set explicitly to find out whether to use the configured default in the first place.
Issue Links:
- Flexible locale resolution based on supported languages [SPR-13330] #17915 Flexible locale resolution based on supported languages
- Mock MVC / RequestBuilder should handle Accept-Language header appropriately [SPR-15209] #19773 Mock MVC / RequestBuilder should handle Accept-Language header appropriately
- Revise AcceptHeaderLocaleResolver default locale handling [SPR-15426] #19987 Revise AcceptHeaderLocaleResolver default locale handling
Referenced from: commits 8343ce9