You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Add HttpHeaders getter and setter for Accept-Language [SPR-15024] #19591
On second thought I've switched to returning the most preferred Locale only. The idea is that if you actually need to examine the full prioritized list then it's best to use Locale#filter. Here is what it looks like actually applied.
Activity
spring-projects-issues commentedon Dec 15, 2016
Sébastien Deleuze commented
Fixed by this commit. Notice that we take advantage of the
Locale.LanguageRangeintroduced in Java 8.spring-projects-issues commentedon Dec 16, 2016
Rossen Stoyanchev commented
I've added one more method to expose Accept-Language as
List<Locale>. See commit fa5636.spring-projects-issues commentedon Dec 16, 2016
Rossen Stoyanchev commented
On second thought I've switched to returning the most preferred Locale only. The idea is that if you actually need to examine the full prioritized list then it's best to use
Locale#filter. Here is what it looks like actually applied.spring-projects-issues commentedon Dec 20, 2016
Sébastien Deleuze commented
I also added a HttpHeaders#setAcceptLanguageAsLocale(Locale) variant.