WordPress / browsehappy

101 stars 36 forks source link

Wrong language is negotiated when multiple are acceptable but with different preferences. #23

Closed MatthewWilkes closed 7 years ago

MatthewWilkes commented 9 years ago

When I visit the site with my language settings as:

Accept-Language:en-GB,en;q=0.8,en-US;q=0.6,de;q=0.4

I see the site in German with an English fallback option at the top. I assume that the site is preferring non-english languages if they're acceptable rather than parsing the q= parameters of my preferences.

The site should use the weightings in Accept-Language, I assume it's just checking for any (semi-random) acceptable one at the moment.