
Stop Guessing Languages Based on IP Address - kristopolous
https://medium.com/@kristopolous/stop-guessing-languages-based-on-ip-address-3862464b97c7
======
bigbugbag
"Stop guessing languages based on IP address" misses the target by going a bit
too far. IMHO it should be "Stop guessing languages", because that's the root
cause of this issue.

It stems from making assumptions on the human and her intentions based on the
computer settings or network location. We know better than that.

Problem is design is made based on metrics and tracking, and things are
tailored to the largest user base and the rest is an afterthought.

The main roadblock is the current lack of a way to ask the visitor for her
language of choice in a way that does not involve words nor country flags.
Tackling this in an almost universal way is not that easy and obvious, but
even a partial success is better than having an automated way force a broken
choice upon the human visiting the website.

~~~
patrick_haply
> The main roadblock is the current lack of a way to ask the visitor for her
> language of choice in a way that does not involve words nor country flags

The whole point of the blog was that the browser _already has_ asked the user
that question in the sense that it defaults to the system language setting,
i.e. the first things you do on a computer when you open it for the first
time.

> but even a partial success is better than having an automated way force a
> broken choice upon the human visiting the website.

I don't understand. What you're proposing as a solution (asking visitors their
language on first entry) is essentially the fallback scenario for guessing
incorrectly.

I try to think of the number of different websites I visit and thinking of
every single one asking me for a language preference makes me feel not good
about using the web. Right now, the worst case scenario is when chrome
automatically detects that the website doesn't match my language and gives me
a popup asking me if I want to translate.

~~~
Manishearth
IIRC it's the browsers language, not the system language. Might be wrong here.

~~~
patrick_haply
Just looking through the Chrome settings, I get linked to this help article:
[https://support.google.com/chrome/answer/173424](https://support.google.com/chrome/answer/173424)

> You can set Chrome to show all settings and menus in the language you want.
> This option is only available on Windows and Chromebook computers. > On Mac
> or Linux? Chrome will automatically display in the default system language
> for your computer.

Obviously it's different for different OS and browser combos, but the
important thing I think is that it's a browser setting and not something that
needs to be configured on every site.

~~~
soneil
I was playing with this today: at least on OSX, I couldn't find a browser that
reasonably handled "I speak more than one language comfortably" out of the box
(eg, using the OS settings).

Safari: sends the primary OS/environment language, and nothing else. (the OS
allows for a weighted list of multiple languages, Safari honours only the
primary language). There is no configuration option for this.

Chrome: sends the primary OS/environment language, then en_US, then en. If you
had a second preference that wasn't english (eg Belgium, Switzerland, etc),
tough. It is atleast configurable (if you look hard enough)

Firefox: entirely ignores the OS environment; uses the localization you
downloaded. But is also configurable.

~~~
Manishearth
What I love about Firefox in this space is that it lets you configure fonts
per-language, which is important because default fonts are often not that
great.

I've never found sites that actually use Accept-Language properly, so I care
as much if that works well.

------
kartickv
On the topic of language, a problem I have in India is that many OSs, apps and
sites don't understand that both "color" and "colour" are okay in India. It's
more a question of style whether you use the US or British or US spelling, and
I don't want my spell-checker enforcing style. Neither is really wrong, like
"colur" would be.

macOS, iOS and Android all get this wrong, insisting on "correcting" color to
colour. This happens in both native and web apps. I tried to work around this
by adding English (US) as a secondary language, which fixes the issue in iOS
but not macOS or Android.

A couple of other related points: it's irritating when apps don't use my
location to pick sane defaults. Google Maps on a new phone showed me a
distance in miles. A computer should never ask you a question it can work out
the answer to. If you still want to change it, fine, but the default should be
sane.

Another problem with language is that many developers think of I18N as a
checklist item to be ticked off. They still use American English like "way to
go". Leave the Americanisms out of it, if you want your non-American users to
feel welcome, as opposed to, "This isn't for you". Americans will also
understand if "way to go" was replaced by "congrats" or "congratulations".

~~~
jeroen94704
"it's irritating when apps don't use my location to pick sane defaults"

No, no, a thousand times NO. Location should NOT EVER be used as a basis for
things like units, currency, date format etc.

_every_ computer these days has perfectly serviceable language and locale
settings. These settings should be the definitive source for any application
to decide how to present language/locale-dependent information to you. If an
application shows you distances in miles, either:

1) The application ignores the language and locale settings altogether and
always uses english/miles. 2) The application does look at the language
setting but ignores the locale setting and decides that "english language"
implies "distance in miles" 3) The application does the right thing, and your
computer is actually set to a locale that uses miles for distance.

Note that none of these scenario's are fixed by looking at the physical
location of your computer.

~~~
kartickv
You didn't even understand what you're supposedly disagreeing with.

The locale settings need to be initialised to something, right? What default
value would you choose? Miles for everyone, as Google Maps seems to? Km for
everyone? Better than either of those is using location to set it to whatever
the customary unit is in their country. Otherwise, you're doing the wrong
thing for hundreds of millions of users.

Whether this particular setting is in the phone OS or in Google Maps is
irrelevant. Either way, it needs to be initialised, and it should be
initialised to something sane.

~~~
jeroen94704
The locale and language are system settings. My point is that applications and
websites have no business second guessing those system settings based on
location.

For the system-level settings, those are always part of the OS install
process. So either an end-user building their own system, a commercial system
builder or downstream provider like a phone company will have to set it to
some value during installation. Location doesn't enter into it.

~~~
kartickv
Location can be used to update the default, on first run. There's no reason
why that has to be the same for US and Indian users. That's the point I was
making all along which you haven't understood.

Second, can you give me a reference to back up your claim that Android has an
API that tells you whether the user prefers km or miles? We're not talking
about language or locale here (things like en-IN) but distance units.

------
unhammer
Oh yes, this is such a nuisance!

* When you download Firefox from Norway, you get the Norwegian version, with the right Accept-Language header setting by default. * When you buy a computer with Windows or MacOS in Norway, it's localised to Norwegian – IE/Edge/Safari presumably sets the right Accept-Language header. Linux users get to choose language during install. * Looking at Piwik stats from a site mostly used by people in Norway, I see mostly "Norwegian Bokmål" as Browser Language (10x as much as English). Dominant browsers are 1. Chrome 2. Safari 3. Firefox 4. IE. So the browsers seem to be doing the right thing.

So even without fancy UI asking what languages you know, Accept-Language seems
to be correctly set (at least for Norwegians). So why are sites using the more
complicated and less precise geoip guess?

~~~
Manishearth
And when you download Firefox from Maharashtra (a state in India), you do not
get the Marathi version. It is non trivial to enable Marathi (you need to
download a language pack addon, folks who need this may not be technically
sound enough or speak enough English to figure this out). Marathi is the 19th
most spoken language in the world, with more than 14 times as many speakers as
Norwegian. What I say for Firefox was true for all browsers last I checked.

So "at least for Norwegians" is correct; this doesn't generalize well at all.

To be fair, Google in India defaults to English anyway (it's complicated --
might have been a sensible choice in the past since you could assume that
folks who use the net know English, but it is probably exclusionary now that
everyone is coming online). But I'm sure what I said for Marathi works for
many other languages.

~~~
unhammer
Thanks for enlightening me :)

Even so, it seems like a bug that you aren't offered the Marathi version (or a
choice between that and English) when you download Firefox from a Maharashtra
IP. Maybe something to report to Firefox bugzilla? Btw, do you need to
download additional language packs to get Windows or MacOS localised to
Marathi when you buy a new computer there?

And what do you think of the UI-solution suggested in the blog post?

\-----

Crazy alternative: Browsers typically include language detection libraries,
used for detecting LTR/RTL status and spelling[1]. The default setting for
Accept-Language could be based on the languages detected when the user types
into spell checked text fields.

[1] Firefox doesn't do this for spelling yet, but I think Safari at least does
[https://bugzilla.mozilla.org/show_bug.cgi?id=1203024](https://bugzilla.mozilla.org/show_bug.cgi?id=1203024)

~~~
Manishearth
I think it's because the Marathi localization isn't an official one.

I've been discussing how to improve this.

IMO the blog post proposes a rather naive UI that will be too involved and
confusing for this task. For advanced users, maybe, but then you want to
actually define the "pretty good" etc. A drag-and-drop-choose-preference-order
is better here, though still involved.

------
nolemurs
So, I may be wrong about this, but my guess is that a lot of non English
speakers browsers are not sending the "Accept-Language" header with the
correct language. Getting that language right requires configuration that most
users can't/won't do, so it's only going to be right if the system defaults do
that, and I think it's pretty likely that a _lot_ of users will be getting the
wrong language.

If the above is true, then it almost certainly makes more sense for these
large international sites to just ignore the header and send the correct
language for a given country. Some travelers may be inconvenienced, but a much
larger number of users will benefit.

~~~
kristopolous
The interface problem is unsolved. My argument that it's necessary and the IP-
based guess is insufficient has two reasons:

First, often there's a local, state, and international language. This is
endemic in India but also exists elsewhere. In Barcelona for instance, there's
Catalan, Spanish, and English.

The migrants to Barcelona generally know at least one of these; such as
Turkish and Catalan, or Arabic and Spanish. So what do you display? The
Catalan version? Spanish? English?

You can find the differently-scoped languages in unlikely places; in Mexico
for instance, Nahuatl has 1.4 million speakers and Yucatec has 759,000. That's
about the population of San Francisco. Not a small number.

Second, international migration is only slated to increase. In Los Angeles,
the neighborhoods of say Huntington Park (pop 58,800) and South Gate (pop
95,677) are 97.1% and 94.8% Hispanic/Latino respectively while Monterey Park
(pop 61,085) is 86.3% Asian/Pacific Islander. The Burbank/Glendale area has
the largest population of Armenians outside of Armenia. Over 50% of LA
residents don't speak English in the home.

So for these cases, is defaulting to the state language a better user
experience than fixing the language selection process?

~~~
bigbugbag
> So what do you display? The Catalan version? Spanish? English?

You let the user choose. A big missing component of international websites is
the UI to let people choose the language they want instead of guessing for
them.

~~~
badestrand
The user obviously should be able to switch the language, for example in the
header.

But you have to display the site in some language on the first visit. Or do
you want to show three big flags and nothing else? The internet would get
annoying very quickly.

~~~
oblio
I'd venture to say that displaying the English version with a clearly visible
flag selector would be good enough in 99% of situationa.

------
Hasknewbie
The real sin here is not just the geoIP, but the patronizing "we will decide
for you, lowly user" tone of many sites: they do not just inflict you with an
arbitrary language, but make it difficult or impossible to undo.

If you take an UI decision on the user's behalf, then you acknowledge you
could be wrong and always offer an option or drop-down menu (at the _top_ of
the page, not hidden anywhere else) to correct it, to me that's just basic UX.

~~~
spacehunt
It gets more condescending than this. For example, nobody treats what we speak
here daily as a language at all, and instead shoves what they think we
understand down our throat.

------
ziikutv
Thanks! For fuck sakes, using VPNs sometimes is a pain in the butt due to
localization.

Edit: Although I understand localization is important, but perhaps we should
favor English - an international language - over a localized one. Of course,
one would say, it being international does not mean well adopted. Perhaps, we
can use some sort of constants to assume a Country's acceptability of English
and first make English the first choice; having localization as an option.

Interesting Anecdote: When I was a tiny little kid in India, we were forced to
use the English version of Google so that we learn English as well as
Computers at the same time. Sure Localization is more user friendly (and hence
I understand it being there) but it is not a standard. After not surfing the
web (or visiting other pages), 99% [1] of the applications/programs on the
computer are not localized.

[1]: Bullshit number.

~~~
kalleboo
> 99% [1] of the applications/programs on the computer are not localized.

I just took a survey of the apps in my dock - 8 out of 12 third party apps are
localized into the UI language of my computer (Japanese). This is on the Mac
though, things might be more dire on Windows.

~~~
ziikutv
Dire indeed.

------
4ad
Google is very bad at this but some sites are much worse. There are sites
which plain refuse to speak English to me at any costs. No option, no nothing.

Some sites insist that if I do business with them, I must do through the local
website. Fine, I can buy from your German website... if you speak to me in
English. There is zero reason to assume that if you force me to use your
German website I speak German. No reason whatsoever.

Look, if you want to have region specific websites, go for it, even though I
will hate it. Just don't redirect me to the one you think I need. Let me make
the choice. And especially don't do it if there's no way for me to get back to
the one I wanted in the first place (looking at you Osprey).

And if you force me to use your region specific website don't assume that
everyone who is forced to visit your German website speaks German.

It's also frustrating that automatic browser translation very often breaks the
checkout process (not to mention the privacy aspect of it).

Of course the nail in the coffin is when a region specific website won't work
with a credit card that is outside that region. Although usually that happens
in the United States, where fortunately website do speak English but won't
take my European credit cards.

This is all very simple, if you do _nothing at all_ , you don't fuck up the
user experience. It's great. Every little helpful "improvement" you make is a
mistake.

~~~
slig
Udacity, for instance, doesn't let me choose English anymore and is very
frustrating.

------
photon-torpedo
For Google, I often find myself smuggling a "hl=en" into the query parameters.
This works on almost all Google services, and is quicker than finding out
where the language switcher is hidden in the UI.

~~~
superasn
Not sure if it works now but by just visiting
[https://www.google.com/ncr](https://www.google.com/ncr) is enough to disable
all localization settings instantly.

~~~
Symbiote
No, that localizes to American, with useless, stupid Fahrenheit and miles.

Another common problem.

------
vbernat
Switzerland has 3 official languages and geoIP is not good enough to determine
in which part of Switzerland you are. I always get pages in German despite
being in the French-speaking part of Switzerland.

Even when traveling abroad I get the problem since mobile connections are now
tunneled to your home country. In France, I get German pages!

~~~
nift
Sorry if this gets too nitpicky according to Google you officially have 4 :)

~~~
OJFord
> _The four national languages of Switzerland are German, French, Italian and
> Romansh. All but Romansh maintain equal status as official languages at the
> national level within the Federal Administration of the Swiss
> Confederation._

[https://en.m.wikipedia.org/wiki/Languages_of_Switzerland](https://en.m.wikipedia.org/wiki/Languages_of_Switzerland)

~~~
jwilk
Non-mobile version:

[https://en.wikipedia.org/wiki/Languages_of_Switzerland](https://en.wikipedia.org/wiki/Languages_of_Switzerland)

------
interfixus
Even were it not a matter of privacy and principle, I should be avoiding most
of Google for this kind of idiocy. On the rarer and rarer occasions when I am
somehow forced into using their services, they invariably insist on force-
feeding me my native language, however much I may be running a thoroughly
English language computing environment, including an English language browser
with a purely English Accept-Language setting.

Same went - until recently - for Play Store access in Android, and I believe
it still does if I access the Play Store web interface, at least as far as
comments are concerned.

Google is not the only offender, but by far the worst that I know of.

[Typo edited]

------
exabrial
Please, this, yes. That and location. I don't live in St Louis, but Google
swears I do and there's no way to change that setting in Google news. I've
emailed their product team but they're also never wrong.

~~~
Consultant32452
This may be outdated. I just opened Goole News and on the right hand side just
below the weather widget thing there's a place where you can change the
location it's providing you news for. Changing the location not only updated
the weather widget but also the local news stories.

~~~
exabrial
Amazingly enough even when you do that, it still insists on showing me 'Local
News' from St Louis.

~~~
moyix
For a long while the only place I could find to change my home location in
google was their (now defunct) movie showtimes page :p

------
xmichael99
I've lived in Costa Rica for 10+ years, yes I speak spanish fluently, but I
would much much prefer to read the site in english. My favorite is Dell.com,
wow they fight so hard to send me to dell.cr, even when I use a VPN they've
gone out of their way to pay for services to redirect me to Dell.CR..

~~~
averagewall
A country specific site isn't the same as a language. Often they're doing
business with people from that country. The US site might not be able to trade
with somebody in Costa Rica. Different way of accepting money, different laws,
etc.

The problem there is that each country's site tends to be only in one
language. Ideally they would have every combination of language and country,
with language being a choice and country not.

~~~
bigbugbag
That's great but consider this: I'm a US citizen traveling in Costa-Rica right
now and I want to buy a Dell computer that I'm gonna pay in US dollars to be
delivered at my home in the US when I get back, now I can't because I'm
redirected to the .cr website that has different ways.

The issue here is making assumptions on the human and her intention based on
the computer and its network supposed location.

------
sulam
In the last three weeks I've been in five different countries and each time
this happened with every major site. Super frustrating! Thankfully this is an
aberration and I don't usually travel much.

By the way, the time zone situation is even worse -- at least I can usually
find an English link. Good luck figuring out if you have a conflict with a
meeting scheduled while you're in Romania but you're going to be in Mexico
when it happens. It's all manual all the way.

~~~
jbg_
I don't understand the time zone issue. Even the macOS included Calendar app
with time zone support switched on makes this a complete non-issue, and Google
Calendar handled it pretty well when I used to use it too. I travel basically
continuously, scheduling meetings in multiple time zones all the time, and as
long as you enter the correct time zone when creating the event, everything
works perfectly.

~~~
sulam
you have to know what the correct time zone is. That's a manual task.

~~~
jbg_
No - on macOS Calendar you just type the city name (or a nearby city).

------
antoineMoPa
Polyglot problem: when Google Chrome always asks you to translate the page but
you just want to read it in the original language and you are too lazy to
disable the popup.

~~~
rochellle
Also, this happens when the page isn't even in a foreign language, but the
majority of words are not dictionary words, and there's a sparse overlap of
one or two words which statistically correlate with a misspelling of a similar
words in some language outside your currently chosen locale.

~~~
slededit
How often does that happen to you?

------
marcosdumay
Also, however you discover my language, don't autotranslate your contents into
it if you don't have a translation (and worse, hide the way to disable it). If
I can't read anything you have, I'll ask my browser to translate, you don't
need to bother.

~~~
nraynaud
Haha, the MS C# docs are just infuriating. There are things I absolutely don't
want to see translated, and language docs are one of those.

~~~
int_19h
Keep in mind that in many cases, translation isn't done because the market
demands it, but rather because either the country laws, or government
regulations for software sold to the public sector do.

~~~
netsharc
Some apps and sites, like iTunes Store, do this with the license agreement,
since they like to pretend the document has legal power, it has to be
presented in one of the country's officially recognised languages. So like the
article, someone only understanding English in Germany signing up for iTunes
has to accept a legal agreement in a language they don't understand...

------
cooper12
Does anyone else find it a bit problematic that documentation, which should
mainly be descriptive, is taking an ideological stance? It's one thing to
describe known bugs around an implementation, but reading the MDN docs on
accept-header, it's pretty clearly advocating against using accept-header. How
can a web-reference justify recommending against standards? I understand it's
not meant as the canonical reference doc, but that's pretty much how it ends
up being used and I think Mozilla should be more conscious of the position of
its docs. (I personally find MDN much easier on the eyes and useful with its
compatibility tables and examples)

~~~
kristopolous
Although not obvious, MDN is a wiki with a pretty level-headed and healthy
community. I've done numerous edits that were well-received so I say feel free
to change it.

~~~
cooper12
Ah, that is a reasonable suggestion. I would but unfortunately I don't feel
technically competent to do so. (I'm more the type of programmer who would
rely on MDN rather than write anything on it) It's too bad there's no
discussion page like other wikis have. Under the feeback tab in the navbar,
there is "report a content problem", but that requires filing a bugzilla.
Don't get me wrong, overall I'm quite satisfied with the quality of MDN (it's
so much better than w3schools which I was using before), it's just the tone of
this particular article.

~~~
ubernostrum
MDN articles aren't supposed to be just flat descriptions of "Feature X does
Y. To use feature X, place the following code in..."

MDN is supposed to be an educational resource that can teach people what
different bits of technology are for, when and why they can be used, etc., and
so it's appropriate -- if there is a common problem with something -- to
mention the problem.

And though I didn't write that article (but I did work on MDN's software
platform during my time at Mozilla), I largely agree that Accept-Language
simply doesn't work, and some other sort of in-page UI is far more reliable.
There's a reason why MDN will do content negotiation, but also shows a drop-
down of languages an article is available in and uses language identifiers in
URLs, after all.

~~~
kristopolous
The description on MDN does fairly accurately describe the state of the world.
It _could_ be read as advocacy but I don't think that was the intention, maybe
the word "describe" is better than "justify".

So I changed it to:

"MDN attempts to describe why Accept-Language ought to be ignored. The reasons
are fairly weak when the..."

Which reframes MDN as a reporter instead of an advocate.

------
einrealist
What I also hate are recommendations based on my IP / location without any
chance of changing it. The example that bugs me most: Spotify. Why can't I
just pick a country and get recommendations for it?!

~~~
jbg_
I have basically the reverse problem. I happened to set my Spotify account up
when I was in Germany, and all my recommendations are forever for Germany and
in German, no matter where I am, with no option to change it.

------
bluerobotcat
When visiting websites from Belgium, one frequently occurring annoyance is
that websites will serve you content in French. This happens even when you're
in the Dutch speaking region (this should be easy to detect since the ISPs are
different between regions).

It's frustrating because many Dutch speakers can understand English better
than French.

It would even happen for websites that support English, French, and Dutch,
such as Skype.com (can't test if it's still happening though).

~~~
hyperman1
Seconded. Country is probably (but hard to guess) 55% Dutch,35% French, 5%
German, 5% Other , and language is a sensitive topic. English has become some
sort of neutral zone. Even so, lots of sites have a 'they'll speak french and
like it' attitude, sometimes even without a way to switch to even English.

------
a_imho
Irritating and frankly it is worse experience than not guessing at all. I'm
yet to understand why someone puts resources into it.

On the other hand I found the best indicator for me is my keyboard settings, I
usually want to consume content in the language I'm currently writing, but
still far from perfect.

------
Moeg
A great annoyance in Finland is the Google maps enforcing minority language on
everyone, a lot of the place names are in Swedish even though app and
everything else is in Finnish, there's no option to change this either.

~~~
ekns
Even weirder still, in my experience, is that Google Maps randomly displays
the names as Finnish sometimes, and randomly displays them in Swedish other
times.

------
anothercomment
I hate accept language. Google keeps pushing me to the German site, and there
seem to be a million places where I might have to configure my computer to
make it do the right thing. My OS is actually set to English, so I don't know
where the German redirect of Google comes from.

What is so difficult about sending me the US site if I go to google.com, and
the German site if I go to google.de? That is really the only language
selector I need.

Likewise, other pages should simply have an explicit URL for another language,
that I can memorize if I prefer that language.

~~~
datenwolf
> I hate accept language.

Did you actually read the article? Because the whole article is basically a
rant about how the non-use of the Accept-Language header is causing the
trouble you have.

~~~
anothercomment
I read the article - it mentions that few people configure their browsers
properly. I brought up my personal experience as unpleasant, because of the
accept headers. Also it is not obvious how to configure the browser properly.
I am German living in Germany, but prefer to do my computing in English.
Apparently that confuses any web sites.

All I want is to have an English site when I type in google.com. If I want to
search in German, I can go to google.de.

What could be simpler than that? All the other stuff is confusing and
annoying. It's also not really "restful"-ish, is it? I think it would
preferable to give the same site as a result of opening an URL, not change it
depending on mysterious parameters.

How is a non-geek even to find out about the accept-headers? Say I know
nothing about Computers, go to Google.com and suddenly I am forwarded to
Google.de. How do I solve the problem?

------
makecheck
Whenever you travel far away, it’s a good idea to “pre-Google” a few important
things and physically store the results. And, install a translation app. You
just never know if your connection will be reliable or reinterpreted in some
way.

It is also useful to have a blocker because occasionally you can deal with
problems by blocking offending domain references. For instance, pages might
“not load” due to font server access issues but realistically you can kill
those and see the page anyway.

------
Merovius
I don't know. I'm annoyed by sites doing that too, but I don't think the
author appreciates the complexity of the issue. Two examples:

They choose Google search results as an example; but when I'm in the
Netherlands, I definitely don't want them to exclude the website of a
Restaurant or Tourist attraction from the results, just because I don't speak
Dutch. That's what Google Translate is for, after all. On the other hand, when
I Google for Recipes, maybe don't show me Dutch results even if I'm in the
Netherlands; I might be able to have them translated, but I think there are
enough English or German recipes for Tomato Sauce too that wouldn't need to go
through this extra layer of indirection. So there definitely _is_ a
correlation between language settings and Geography - in _some_ cases.

I'm also dissatisfied with Accept-Language. For example, I speak both English
and German well enough that there isn't a huge difference in comprehension. If
I just set Accept-Language to English and German with q=1, and visit pages of
a German, a US and a Spanish University (assuming all three of them have all
languages available), they should behave very differently.

Now, let's complicate things by throwing politics into the mix; choose the
wrong language or show the wrong results and suddenly you are offending one
subset of people or the other.

Languages, Countries, Politics and Humans in general are inherently messy and
complicated. If you see a problem that has to do with any of those and you
start a sentence with "just do X", then it is very likely that your
Engineering brain is oversimplifying things (and also, FWIW, you are showing
your privilege in not having to consider that other people might work _very_
differently).

------
soneil
The problem is that it's surprisingly difficult to make accept-language
negotiation actually work (unless users specifically dig into their
configuration and make it so, no browser I've tried gets this right out of the
box)

Lets take a reasonable scenario - the wikipedia articles for Birmingham (UK).
In English, the article is as fleshed out as you'd expect, for the second-
largest city in the UK. In Slovak, there's a couple of pretty pictures, and
two sentences.

A user arrives with the header "Accept-Language: sk-SK,en-US;q=0.8,en;q=0.6".
Which article to I send them?

The 'naive' approach is to send them the two-line summary in Slovak. Their
preference is Slovak, I have Slovak, let's do this. Easy.

The 'weighted' approach is score my available translations, decide that, eg,
my English article has a weight of '1' (it's the best translation of this
material I have), my Slovak article has a weight of 0.2 (it's a pretty crap
translation). Content weight * User weight gives me 0.8 for my English article
(1 * 0.8), and 0.2 (1 * 0.2) for my Slovak article. So I deliver the English
article - the user has expressed that English is "pretty good", and I can
deliver much better content in English. As a programmer, I love this approach,
it saves delivering poor translations to users who don't need them.

Now, the reality. The user has sent en_US;q=0.8 not because they speak a
single word of English, but because Chrome will by default, send the OS
environment as 1st preference, en_US as second, and en as third. Being clever
failed.

Any time we have to admit that our translations are not made equal, accept-
language (or rather, current browsers' default configurations of it) is simply
too naive.

------
watter
Google Maps also does something like this. Open a maps tab in Winnipeg and it
will show you downtown Calgary if the ISP is Shaw Communications. Twitter even
started recommending I follow former Prime Minister Stephen Harper because he
represented a Calgary riding. I don't live in either of these cities.

------
nottorp
It's not only languages. I used to check my weather at weather.com, but they
decided to give me weather by default based on my IP address. They remember
what locations I checked before, but they don't care and give me the
geolocation result first.

Guess what, they're getting the country right, but they're a couple hundred
kilometers off, which makes the weather information useless.

And back to the article topic, I'm in the camp that absolutely hates localized
software. Translations are a lot more verbose than English and/or simply sound
ridiculous. Please keep your site in English when you present it to me.

------
gkya
Maybe browsers should have an initial "choose your languages" popup that shows
up after install. Then Accept-Language settings would become more correct and
the need for weird guessing games would disappear.

------
peterwwillis
Counter argument: American sites should try supporting a language other than
English.

Many EU sites have multiple languages sorted into different flags up at the
top of the page. Ours do not.

~~~
spacehunt
Please, don't use flags unless you want to bring politics into it.

~~~
michaelmrose
its a visual representation of a language that often conveys information to
people whom speak an unknown tongue. Given an array of choices people may be
able to pick out the graphic quicker.

~~~
ubernostrum
Would you like to not be allowed to do business in China? All you have to do
is use the flag of the Republic of China to indicate traditional Chinese.

Use names of languages, localized into those languages, for the selection. Or
if you _must_ save space, use two-letter language codes.

------
MatthewWilkes
There are a few bad implementations of Accept Language parsing out there too.
BrowseHappy is one, it gets the weighting wrong and displays the wrong
language a lot.

------
haspok
Let's not forget the case of multilingual websites where one version may have
significantly less or different content than the other.

Example: I visited a Swiss website recently that displayed itself in German by
default (I'm in the UK), and also offered an English version with a warning
that it is lacking in content and is not up to date.

So probably the choice of the language should be a combination of user
preference AND website preference.

~~~
atemerev
I live in Geneva, Switzerland, and I am tired of websites automatically
switching to German (even Google). Geneva is in the French-speaking part of
the country. Switzerland is trilingual. I prefer English, French is also fine,
but switching to German while nobody here even speaks it...

~~~
Merovius
> Switzerland is trilingual.

*quadrolingual

Don't forget about that pesky Romansh ;)

------
planetjones
I wrote an article about the very same subject 3 years ago. Little has been
done to make it better:

[http://www.planetjones.co.uk/blog/27-04-2014/web-
internation...](http://www.planetjones.co.uk/blog/27-04-2014/web-
internationalization-often-inconsistent.html)

------
Manishearth
No, not everyone who uses browsers will actually go through settings and deal
with this. Plenty of folks run browsers without the default language changed
(it's a nontrivial procedure!), and they'd likely not look for the language
tweaking UI. The browser UI language isn't actually too important -- all the
important buttons these days are icons. The language you see Google in is more
important.

Some UX could certainly be designed around this. Google could default to
Accept-Language and say "Did you want Google in Language X" (in the IP
detected language) in a bubble, with a link that triggers the language-setting
UI (somehow). Or it could default to IP detection with an API for the reverse.
The current situation of far too many people sending flawed `Accept-Language
"en-US,en;q=0.5"` headers will have to be worked around somehow.

Google already suggests English when it detects that you've changed the
language you use (I'm not sure if it suggests english when you are logged out
and switch locations, or if it perhaps suggests whatever your Accept-Language
is)

~~~
nv-vn
Imagine if the first time you opened your browser it had a big grid of
flags/languages to choose from. This would be trivial to get users the right
Accept-Language. You could even have it do this every time you open the
browser if the computer is used by multiple people.

~~~
spacehunt
You are assuming the site would remember what language the users have told it
to use.

YouTube, even after all these years, forgets this every 3 days, even when I'm
still logged in. But it doesn't forget what ads to shove to me though.

~~~
int_19h
The site wouldn't have to remember. It would get an Accept-Language header in
every request, and should just use that.

~~~
spacehunt
Which is still the wrong way to go about it, unless the browser lets users
easily set this per site, like how some browsers did for text encoding.

~~~
int_19h
It's the right way to pick _the default_ even now. Websites can still provide
language selection. Although, yes, it would be better if there was a way to
define Accept-Language on a per-domain basis (including wildcards).

------
skummetmaelk
The rise of the internet was a great chance at making the world speak a common
language, whatever language that might be. Instead we decided to localize it
to avoid making people feel uncomfortable.

Localization is such a pain in the ass. When you are abroad you always get the
the wrong language and many business sites try to force you into using a
specific domain that does not even support english. Try reading dell.com in
Europe.

I see so many people using mac OS and windows localized to their own small
language with a few million speakers, making it effectively impossible for
them to get support online when googling instructions is impossible because
menu items you have to click do not have the same descriptions in different
languages.

What is even worse is that sites like youtube have started automatically
translating video titles into whatever language it _thinks_ I want. Even if
the translations were correct, which they never are, why in the world would I
want them to be translated?

Localization needs to die and it cannot go fast enough.

~~~
keldaris
Not sure why this got downvoted - it's a perfectly valid personal opinion and,
albeit expressed rather strongly, doesn't seem to violate any HN guidelines.
Have an upvote.

------
homero
Last time I couldn't even find a way to get back to Google.com. It was
constant redirects.

~~~
jsnell
[https://google.com/ncr](https://google.com/ncr) (ncr == no country redirect).
It'll also set a cookie that'll prevent the redirects in the future.

~~~
4ad
Except that somehow it doesn't work reliably.

This problem hits me every time, I know about /ncr, so I visit it, and then it
works for a while. Until it doesn't. It's beyond frustrating.

~~~
slig
[https://encrypted.google.com](https://encrypted.google.com) seems to work
better than /ncr for me

------
steinuil
A bit off-topic, but I'm italian and despite my best efforts to use english as
system language on my Windows installation, I still catch some programs using
italian.

Where do they even get it from? Date and currency formatting settings?
Timezone? I'm baffled.

~~~
shouldbworking
Keyboard input language maybe? Is the Italian keyboard layout different?

------
martin-adams
So in the Google example, if I travel from the UK to Germany with Brisish
English as my language.

Should I get google.co.uk, or google.de but in English?

I can see a few problems, such as some results not having English pages and
possibly not being able to use local search.

------
Clownshoesms
One single language makes sense. Until we get Teilhard's unity. Or something
similar.

Or Julian May's. The Pliocene saga was an interesting read I thought.

------
cbit
there is more then .de in europe and german is not german

for example: you have 3 complete different countrys which all speak german .DE
.AT .CH

you need to handle taxes, currencys, even some special characters like: ß
street = strasse (CH) = straße (DE,AT)

until they dont implement "choose youre country" on setup of any browser there
will not be a replacement for GEOIP

~~~
int_19h
> until they dont implement "choose youre country" on setup of any browser
> there will not be a replacement for GEOIP

There's "choose your country" on setup of your OS, and your browser is
perfectly capable of picking that setting up and communicating it to the
browser - there's a standard protocol for that.

------
id122015
most annoying is Google News when I dont want local news. Also YouTube

~~~
mrweasel
Most annoying to me is Wikipedia. It is almost never the case that I would
prefer the Danish article over the English. Yes, Danish is my native language,
but why would I want a 10 line article in Danish, when there's a 5 page
article available in English.

It's not that I don't appreciate all the hard work the Danish authors put into
the articles/translations, but I'm still left with an lower quality because of
an assumption made by the Wikipedia site.

Of cause the problem is that even being able to weighting my preferred
language won't help, because some sites I want in Danish, and some I would
prefer to have in English, even if a Danish translation is available.

~~~
Grue3
Why wouldn't you go straight to en.wikipedia.org? If you use a per-language
site, Wikipedia never redirects you.

------
Kenji
It's much worse on Xbox One. You have to change your country to something like
the USA to be able to even SELECT English (the option doesn't exist for non-
English speaking countries). And if you do that you can no longer pay because
payment options are locked down by country, so you have to switch back to your
original country to buy something. How can Microsoft blunder so horribly? How
can anyone even conceive of the idea that people only speak their own language
in their country? It is maddening.

