Bug 5152

Summary: Accept-Language header incorrect locales, only 1 language
Product: WebKit Reporter: Dan Wood <dwood>
Component: WebKit Misc.Assignee: Chris Blumenberg <cblu>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   

Description Dan Wood 2005-09-27 09:16:03 PDT
Summary: The Accept-Language header that webkit sends is not properly dealing with locales (e.g. 
brazilian portuguese), and it only sends one language, even if you have defined multiple ordered 
languages in your system preferences.

To reproduce
* Open up System Preferences -> International -> Language
* Load <http://www.gmdc.org/publicapp/snoop.serv?testParm1=testVal1&testParm2=testVal2> (or 
any other web page showing you the HTTP headers

Now move the following langauges to the top of the list in System Prefs, and reload the page, noticing 
the value of the Accept-language parameter.

For instance  (view in a monspaced font):

Topmost Locale        Expected     Actual
--------------        --------     ------
British English         en-gb       en
Australian English      en-au       en-us
Canadian English (eh?)  en-ca       en-us
Portuguese              pt          pt-pt
Brazilian Portuguese    pt-br       pt-pt
German                  de          de-de
Swiss German            de-ch       de-de
Canadian French         fr-ca       fr-fr
Swiss French            fr-ch       fr-fr


The other issue is that according to <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>, you 
can specify multiple languages that your browser accepts; it seems that WebKit should take more than 
just the topmost language in AppleLanguages into account.
Comment 1 Alexey Proskuryakov 2005-09-27 13:40:00 PDT

*** This bug has been marked as a duplicate of 3510 ***