Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nothing about the content of the site, but please stop determining the language of the user based on geolocation. If the browser says he wants English, serve English.


Hello, author here :) It's actually not based on geolocation, I just directly look at navigator.language / navigator.browserLanguage: https://github.com/pcottle/learnGitBranching/blob/main/src/j...


If the browser says English, chances are pretty good that's because the user didn't configure it.

... that's the explanation I've heard, but I agree that it's obnoxious.


That just doesn't seem to follow for me. Aren't most browsers auto-configured to request the language they were configured in? And don't most browser installs / setups default to the language of the user's system?

I feel like if the browser requests English, odds are overwhelming that the user wants English. Assuming otherwise strikes me as someone trying to get a bit too clever with their heuristics. (And ending up in a worse place than if they hadn't bothered - location is a terrible, terrible heuristic for language.)

I think the real issue here, though, is that the language button at the bottom of this page isn't interactive until several dialogues have been clicked though. Dialogues that are likely totally incomprehensible to the person trying to change language.


> Aren't most browsers auto-configured to request the language they were configured in?

This may be true now. It was less true in 90s, where this logic originated.


I don't recall browsers behaving all that differently in the 1990s. Per W3, re MSIE 4.0, in 1997:

> The Accept-Language header defaults to the current System User Locale ID but can be overridden by user.


Usually browsers automatically configure themselves according to the operating system language (I guess).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: