Imported from the Apple Support Forums via the Wayback Machine 🔗
Why does Safari ignore all of the user's system preferences for languages except the first language? Safari sends only the most-preferred language's code (such as "en" or "ru") to the server. The HTTP standard allows much more detail than this. Multiple languages are permitted, and the browser can specify for each language a weight, to show its relative preference. Other browsers give more detail. Safari could give more detail, because OS X permits the user to specify many languages and order them by preference in System Preferences.
I'm developing a Web application that uses all the browser's language preferences in order to give the user a choice among interface languages and show all the preferred languages at the top. This works with, for example, Firefox, but with Safari only the single most-preferred language can be shown at the top.
Imported from the Apple Support Forums via the Wayback Machine 🔗
I agree with what the OP is saying here. With "other" browsers, the accept-language header differs from what Safari sends in two ways:
1. If the user has specified multiple languages in preference order (for example I have en-AU (Australian English), then en-UK (UK English) then en-US (US English) in that order), all three are sent to the website (in order) in the accept-language header on each request, so the website can match on the best (most preferred) language they support that I'd like to see. Safari only sends one (equating to the first language I have chosen in System Preferences)
2. (this is actually the worse one for me) Other browsers send the full language request tag for the specific language/locale that has been chosen, Safari only sends the basic language one. That is, even though I have chosen Australian English (en-au) and you might have chosen US English (en-US or just en), Safari will only send en in the accept-language header. The effect of this (other than some spelling differences in the website if they explicitly support both) is that dates are formatted for me the "wrong" way. In Australia (and the UK) we specify dates as day/month/year; in the US it is month/day/year (ie 1/9 is 1-September for me but is 9-January for US people).
Imported from the Apple Support Forums via the Wayback Machine 🔗
It looks like the WebKit guys have been aware of these shortcomings for a while:
[Bug 3510: Multiple issues with Accept-Language (opened July 2005)|http://bugs.webkit.org/show_bug.cgi?id=3510]
0
Hawaiian_Starman·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi
Have a look at Safari's Info panel via the Finder>HD/Applications/Safari.app. In the panel's Languages section, are all Languages selected? If not, check all boxes, then restart Safari.
0
Jonathan Pool·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for the suggestion. I wasn't aware of the Languages section of the info panel, but I found that all its languages (only a fraction of those available via System Preferences) were already checked.
Are you saying that Safari does not always transmit only a single language in the ACCEPT_LANGUAGE header?
0
Hawaiian_Starman·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi
Are you saying that Safari does not always transmit only a single language in the ACCEPT_LANGUAGE header?
That's a question I can't answer. Do you have Apple Care? If so, call Apple Care and report a software problem. If you get to Level 2 you might get an answer to your query.
0
Ted Harper·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I agree with what the OP is saying here. With "other" browsers, the accept-language header differs from what Safari sends in two ways:
1. If the user has specified multiple languages in preference order (for example I have en-AU (Australian English), then en-UK (UK English) then en-US (US English) in that order), all three are sent to the website (in order) in the accept-language header on each request, so the website can match on the best (most preferred) language they support that I'd like to see. Safari only sends one (equating to the first language I have chosen in System Preferences)
2. (this is actually the worse one for me) Other browsers send the full language request tag for the specific language/locale that has been chosen, Safari only sends the basic language one. That is, even though I have chosen Australian English (en-au) and you might have chosen US English (en-US or just en), Safari will only send en in the accept-language header. The effect of this (other than some spelling differences in the website if they explicitly support both) is that dates are formatted for me the "wrong" way. In Australia (and the UK) we specify dates as day/month/year; in the US it is month/day/year (ie 1/9 is 1-September for me but is 9-January for US people).