4 ms·
Is Accept-Language widely and correctly sent by browsers? I've seen some pretty weird Accept-Language strings getting sent by UAs, but I don't really know how
by Eridrus 9y ago
Is Accept-Language widely and correctly sent by browsers?
I've seen some pretty weird Accept-Language strings getting sent by UAs, but I don't really know how accurate they are compared to GeoIP + Account Settings.
- onli 9y agoAll the big browsers do send a proper Accept-language string. It is configurable and uses OS settings as default. One can't really go wrong with that. Discovering Accept-Language was a small revelation. I had no idea on how to do the localization of a web project of mine, geo-ip sounded ridiculous to me (not configurable). And there it was, a sound solution already provided by the browser.
- phn 9y agoI don't know about accuracy, but please, put Accept-Language in front of location/GeoIP. It is frustrating when Google redirects to the country I'm in. I still speak the same languages even if I'm traveling!
- Eridrus 9y agoBut that's the thing, browsers regularly send Accept-Language, if it's overall less accurate than ip geolocation, then it's hard to prefer it.
- phn 9y agoWell, it generally mimics your OS settings, so why is it inaccurate? The worst case is pages displaying in the same language as the rest of my computer.
- Eridrus 9y agoThere's a long tail of mobile browsers out there. I also don't know how many people have OS settings that differ from their real language preference due to poor OS support for their language (e.g. what this article talks about - how many users run en-US to get features that Win10/Android/etc doesn't do well in their language) I mean, there are reasonable arguments either way here IMO and without actual data, e.g. how often users change their language from one or the other, it's hard to know what is better in the long tail. And obviously users should be able to change their preference if we get it wrong.
- gcp 9y agoI also don't know how many people have OS settings that differ from their real language preference due to poor OS support for their language Why would these people be badly served by being sent pages corresponding to their OS language? It's clearly preferable for them over poor localization.
- Gys 9y agoIts unbelievable to me that Google makes this mistake. Very frustrating. Makes me sometimes wonder how accurate their ad system is ? If they do not seem to record such incredibly basic and clear thing as the few languages I can read...
- Semaphor 9y agoRarely used in my experience.
- notatoad 9y agomy localization efforts have mostly been limited to english-canadian and french-canadian traffic, but i've found that the Accept-Language header is the most reliable indicator of language preference. It tells you the language the user's operating system is configured to use.
- Eridrus 9y agoThat's good to hear; have you been able to measure language switch rates or discrepancy between accept-language and account language settings?
- notatoad 9y agoThe only measurement i have is anecdotal, french customers used to email our support to complain about a lack of french-language support (we have always had french support, but they didn't like having to find a button when we detected the language wrong). Since switching to accept-language i'm not aware of any complaints.
- Eridrus 9y agoCool!
- kwhitefoot 9y agoGeoIP means that Google gives me a polish login page when I am in Poland even though my browser says en-gb.
- skrebbel 9y agoYes. For decades already. Browsers default it to the OS language, which often indeed is the users preferred language. Relying on GeoIP for language info is done, I suspect, mostly simply because too many programmers don't know about Accept-Language. So great that you asked. Yes, it works and it's great.