by makeitdouble · 1y ago · 0 comments
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.
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.
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.
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.
Technically Accept-Language allows you to specify a "quality value"/weight for each 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... 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.
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.
Yup, agreed. I highly doubt most websites even look at those weights in the Accept-Language header anyways.
Having a list of supported langs in the manifest costs nothing. Lazy-load the manifest when the user goes to use the language selection dropdown, or when the response from the server is in a different language than the one requested in Accept-Language (check Content-Language or html `lang` attr).
Looks like there's a name for this, but no standard: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Con...
People are complicated and having simple heuristics to predict what more than half of them want is not feasible at our level of technology.
Sure any single person will have somewhat simple rules to decide what languages they want, you could come up with simple rules for the people in your life. But you're not trying to solve it for a specific group of people. The target is 8 billion people, most of which we have no idea what their life is.
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.
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.
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)
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.
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.
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.