News for hackers. Stuff that matters.
Re:It’s probably never going to work in German by avar on Tuesday February 26, 2019 @11:37AM (#19255765)
This is a good idea in theory, but completely unworkable in practice. Most users do not have the skills or know-how to navigate whatever Accept-Language setting their device is exposing.

But yeah, sites should have a way to sticky it once you have a profile and log in etc., but most users aren't going through that path for most sites.

Re:It’s probably never going to work in German by ip26 on Tuesday February 26, 2019 @11:41AM (#19255804)
Presumably they wouldn't have to. If they are running en-US Windows, they get en-US websites. If they are running fr-CH Windows, that's the websites they get. You don't really have to worry that someone running ja Windows can't read Japanese.

(Of course, you'd still expose the option to change this from the inherited default in the browser's preferences)

Re:It’s probably never going to work in German by avar on Tuesday February 26, 2019 @02:03PM (#19257281)
Yes you do. Plenty of people using an OS in whatever language can barely speak a word of that language.

Most commonly they'll use an English OS for whatever reason and want to browse websites in their local language.

This is why you'll find that a lot of website language detection tends to discount English specifically. I.e. if your Accept-Language is "en" in France they'll probably give you French, but if it's e.g. Japanese in France they might think that's a "real" setting and give you Japanese.

Or, as I'm sure a lot of non-English speaking technical users here can attest to, they like to use an English OS UI on their laptop or phone, but speak the local language and want browsing a local website to just work. Non-technical users do that too, but have no idea how to tweak their Accept-Language independently from their OS language.

Really, do armchair commentators here think that programmers at major websites like Google that have enough data to know how people are likely to switch languages from the default haven't thought of just implementing what's literally the most simple thing you can do, which is to obey Accept-Language?

Re:It’s probably never going to work in German by jakub_g on Friday March 01, 2019 @12:01PM (#19282718)
BTW. I accidentally discovered that in case of accessing google.com from non-English speaking country, `en-US` is treated as non-reliable (probably because many devices have this set as default), whereas `en-IE` for example is treated as reliable. Also appending any non-English language after `en-US` does the trick AFAIR.

Basically `en-US`-only Accept-Language seems to be treated as "perhaps default language of a device and user didn't change it, we should not rely on it" and IP-based localization is applied in that case ("in France? ok show French version").

Re:It’s probably never going to work in German by sk5t on Tuesday February 26, 2019 @12:03PM (#19256092)
In approaching 100% of cases the operating system pesters you to set a language+locale during setup, and the browser propagates that via Accept-Language. The advanced use case is the user who wishes a set of > 1 weighted language ranges; e.g. de-DE most preferred, then English in any culture, then Latin American Spanish.
Re:It’s probably never going to work in German by throwaway34241 on Tuesday February 26, 2019 @02:22PM (#19257457)
How is having a significant number of users be served the wrong language for every site they visit, then having to navigate and create a profile and set the language for each site individually in a different way, in any way an acceptable solution either?

If for historical reasons Accept-Language needs to pass through the OS locale, which is wrong and can't be changed, why not just standardize an optional User-Requested-Language(s) header, that only appears if the user explicitly sets it in the browser?

The current solution is awful and improving it doesn't seem like rocket science but there seems to be zero interest in fixing it. Stuff like this is why closed platforms like Facebook probably have a brighter future than the open web.

Re:It’s probably never going to work in German by alistairSH on Tuesday February 26, 2019 @12:47PM (#19256562)
Doesn't the browser pick up the OS language setting? That's going to be correct for most users.

And browsers could make the override easily discoverable in preferences (at least on MacOS, app preferences are in a standard place from the user's perspective: File -> Preferences).

Re:It’s probably never going to work in German by groby_b on Tuesday February 26, 2019 @12:59PM (#19256679)
That's actually not correct for most users. Most well-known case is India, where the OS language is usually set to 'English' for $REASONS, but people still prefer content in Hindi. (Or Urdu)

Guessing what language a user actually speaks is not straightforward.

Re:It’s probably never going to work in German by Symbiote on Tuesday February 26, 2019 @01:17PM (#19256852)
What are the reasons?

It still doesn't make sense to use the same behaviour in Europe, where in my experience the OS language is almost always the preferred language of the user. (Especially on a mobile.)

Re:It’s probably never going to work in German by groby_b on Tuesday February 26, 2019 @07:49PM (#19259906)
Several things, AIUI

1) Inertia. The Indian market is largely English-speaking, so many products came to market in English first, and now people are used to it.

2) Colonialism. Using English still marks you as "educated" and "more respectable". So, to not look like a yokel, everybody sets their UI to English. Content, which is more ephemeral, still is successful in Hindi/Urdu.

3) Localization is hard, and often the English localization is better - but content isn't localized, its first language is the native language.

IIRC, most browsers do default to the OS language. It's just not the correct choice in all cases :)

Websites doing weird things is websites trying to be smart and failing on top of that.

Re:It’s probably never going to work in German by baybal2 on Tuesday February 26, 2019 @09:40PM (#19260416)
Same happened in Pakistan, the higher up the social ladder you go, the more likely you stumble on somebody who simply can't do written Urdu, or even speak it.
Re:It’s probably never going to work in German by alistairSH on Wednesday February 27, 2019 @08:34AM (#19263101)
That all makes sense, thanks for clarifying.
Re:It’s probably never going to work in German by hyperman1 on Tuesday February 26, 2019 @02:58PM (#19257803)
In my experience, most European sites will/should consider 'English' as default/unset/unknown. So when in German,y, if the header says French, give French . If the header says English (US or UK), give German.
Re:It’s probably never going to work in German by Symbiote on Wednesday February 27, 2019 @02:44AM (#19261642)
What am I supposed to do, as a native English speaker living in Denmark?

I've tried en and en,da, but I almost always get Danish in Denmark and the local language if I travel.

Re:It’s probably never going to work in German by jakub_g on Friday March 01, 2019 @12:07PM (#19282799)
FYI, Irish (en-IE) instead of en-US works fine for me, at least on google_com, to reliably get English content.
Re:It’s probably never going to work in German by Wowfunhappy on Tuesday February 26, 2019 @12:51PM (#19256604)
Tiny correction, the standard is actually `AppName` → Preferences under macOS X.
Re:It’s probably never going to work in German by jfoucher on Tuesday February 26, 2019 @11:39AM (#19255790)
In Firefox: Preferences -> Language and appearance -> Language
Re:It’s probably never going to work in German by Tomte on Tuesday February 26, 2019 @11:45AM (#19255864)
Exactly. That's too complicated for a large portion of browser users. I'm not kidding and I'm not dissing them.

They shouldn't have to fiddle with language settings. That's a tech failure.

Re:It’s probably never going to work in German by gnud on Tuesday February 26, 2019 @12:20PM (#19256283)
What is actually a tech failure, is assuming I understand Spanish if I happen to be in Spain. That sort of ham-handed, short-sighted approach drives me nuts.

You only need "fiddling with language settings" if you want something other than how your operating system is configured.

Re:It’s probably never going to work in German by cmg on Tuesday February 26, 2019 @01:29PM (#19256968)
Google actually did this at one point. I was in the Netherlands when I signed up for Google+. I don't speak Dutch and hadn't changed any of my language settings - the only way they knew was via my IP address. The UI was mostly in English, but all my circles (or whatever they were called) were named in Dutch.
Re:It’s probably never going to work in German by JoeMalt on Tuesday February 26, 2019 @03:52PM (#19258212)
I get the weirdest language bugs with Google: - The info box on the right hand side of the search results intermittently shows up in German - A suggested event (a football match) in the UK (where I am) had both team's names transliterated into Cyrillic - An airport on Maps consistently shows up in either French or Finnish (or both!)
Re:It’s probably never going to work in German by zdragnar on Tuesday February 26, 2019 @11:49AM (#19255929)
Isn't the default value whatever the OS is set to? Your "average user" shouldnt need to fiddle anyway.
Re:It’s probably never going to work in German by blotter_paper on Tuesday February 26, 2019 @12:45PM (#19256546)
If this is too complicated, it is the fault of the user agent. That's a different issue than whether a website should respect a requested language if it is available. You're arguing that the user agents are flawed, so we should have flawed content delivery to compensate. This is how flaws get folded into systems and magnified over time. Just fix whatever flaws exist in the user agents, language selection based on http headers is a pretty good solution for the half of the problem it covers.