3 ms·
> Every browser sends an Accept-Language header. It tells you what language the user prefers, not based on location, not based on IP, based on their OS or brows
by makeitdouble 1y ago
> Every browser sends an Accept-Language header. It tells you what language the user prefers, not based on location, not based on IP, based on their OS or browser config. And yes, users can tweak it if they care enough.
This is also a broken assumption.
First, Accept-Language is an ordered list, and most daily-multilingual people don't have an absolute order of preference, and more a topical list of preferences.
If I read an English news site that has a translated French version, it doesn't matter if I'm most proficient in French, I'll want the English version.
Then, as an affect of the first point, users will specify their most practical language, not some actual preference. For instance local non-English sites tend to do less shenanigans than international English ones, so having one's language set as English only will force English display for the former, with few impact on most other sites.
A French site ignoring all preferences and just pushing the French version by default actually helps in that case.
If anything, I just wish site owners stopped trying to be cute or clever and just had a very obvious and quick interface to switch to other versions. Wikipedia does it decently well for instance.
- hnfong 1y ago> Then, as an affect of the first point, users will specify their most practical language, not some actual preference. Where does this assumption come from? Given the fact that many (most? almost all?) sites don't honor the Accept-Language header, I doubt that there's much game theory going on in users' head when deciding this configuration.
- Aachen 1y agoThey're right. Try to find a Dutch IT person with a laptop not set to English. Only a small fraction will realise you can set more than one language and put Dutch as a second, even though many struggle beyond basic reading comprehension in English. They're not picking it because they're just as good, much less better, at English compared to Dutch We definitely pick languages that work as opposed to languages that we speak. Setting it to Dutch is just worse: UX doesn't fit, english search results wouldn't show up (way fewer results/content/info), and translations often don't make sense (imagine a button called "you shut it" on a modal window, it's a literal translation of one interpretation of the string "close it" but you'll be confused as to what that button will do)
- jeroenhd 1y agoThe language set defaults to the language set in the OS, which is usually the preferred language for most users. You have people working in IT who set their language to English for easier troubleshooting (i.e. not needing to Google error codes), but they're a small minority.
- makeitdouble 1y agoAnyone handling more than one language daily will be doing an explicit choice, and I wouldn't say they're a minority. If your native tongue is Spanish but you live in the US for instance, the "preferred" language in your browser has IMHO a higher chance of being English. Same if you live in India probably.
- makeitdouble 1y agoI'd assume most WordPress based sites handling multiple locales will switch based on the Accept-Language ? Same if they let a framework handle the switch instead of a home-baked solution. Even for auto-translated content, I wouldn't be surprised if it was off-the-shelf plugins that handle the switch. All in all, I think it takes more effort to ignore the Accept-Language header. That won't prevent sites from tweaking it or doing their own cooking, but it kinda requires intent.
- nulld3v 1y ago> First, Accept-Language is an ordered list, and most daily-multilingual people don't have an absolute order of preference, and more a topical list of preferences. Technically Accept-Language allows you to specify a "quality value"/weight for each language... https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept-Language https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/... IMO there is a lot of improvements that can be made by both the browser and websites: Websites should probably allow users to override the browser-requested language. But browsers should also allow users to choose between "Site default", "Request system default language", "Request English", "Request Chinese", "Request Spanish", etc. on a per site basis. Most optimally however: sites should expose a list of supported languages, maybe in the manifest.json: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest https://developer.mozilla.org/en-US/docs/Web/Progressive_web... Format would be something like: `Map<iso639Code: string, Tuple<translationQuality: float, comments: string>>` Language selection should be done on the client side, not on the server.
- makeitdouble 1y agoFundamentally the issue for me is, this behavior can't be automated in an elegant way. Having priorities and weight and language lists in the manifest help for negociation, but at the core of it, the user will want to choose language based on context and content. > Language selection should be done on the client side, not on the server. Yes. Using a site specific list on the client side could also do it (let's say I always want Facebook in a language and Google in another, Linkedin in yet another etc.). It still will be pretty cumbersome, probably needs an auto-save and sync of the preferences, and still hits problematic cases, but it would be the most pragmatic solution. The worst instance of it is IMHO the way Google Maps work, changing language based on the country gives the best display (local names in the proper writing, no internationalization), I wish there was an easier way than screwing with the Google account preferences. As you point out, having clients able to unambiguously request a specific version at each requests would gives us so many more options.
- poulpy123 1y agoIt cannot be fully automated but if we can automatically select a language based on native or translated it would cover 99% of use cases
- Freak_NL 1y ago> If I read an English news site that has a translated French version, it doesn't matter if I'm most proficient in French, I'll want the English version. The solution there is not to abandon the very useful Accept-Language header, but to never offer half-baked translations. Is your website multilingual? Fine, but only offer fully translated and verified translation sets. It's OK to have your UI and your own content translated in a few languages — for a company that may make sense depending on their target clientele — but you'll have to maintain all of these and keep them in sync. However, user content is off-limits. No automatic translations unless you only offer those under a button to be helpful (like 'Spanish detected, click to show an automatic translation into English'), but really, leave that to the user's browser. Use Accept-Language to pick a language, and then offer me a way to switch in addition to that. That's all there is to it. > Wikipedia does it decently well for instance. Wikipedia doesn't do that. Each language is its own instance, where content may be ported to by translating it (or parts of it), but outside of the Mediawiki UI texts, it is not a translation of the same content. The Dutch version of the lemma 'Language' is a different article in a different language with some overlap. There is no claim made that it is the same article in Dutch. It is hosted on a different sub-domain and path on purpose.
- makeitdouble 1y ago> never offer half-baked translations Sadly that ship has sailed. We can look at the reaction from smaller youtubers as auto-dub rolled out. Most are sympathetic to the quality issues but are seeing it as either a "good enough" or at least a "better than nothing" feature that helps them expand their audience with no visible cost on their side. Or official government sites that have explicitely disclosed AI translations and didn't bother passing it through a regular translator. This situation just won't get better. Except perhaps the day AI is actually intelligent and we have human being level translators running on cloud servers. > Wikipedia Yes, those are not translations, but in that specific case they also don't need to: the quality of the article will vary depending on the editor, but there's no "original" article, so nothing to translate from IMHO.
- watwut 1y ago> Fine, but only offer fully translated and verified translation sets No, I do not want the translation at all, unless I say so. Really. Even if it is the best translation in the world. I want and need to choose the language I will read or watching something in.
- account42 1y ago> First, Accept-Language is an ordered list, and most daily-multilingual people don't have an absolute order of preference, and more a topical list of preferences. No, it's a partially ordered list. > If I read an English news site that has a translated French version, it doesn't matter if I'm most proficient in French, I'll want the English version. Then you should have both with the same priority.