Hacker News new | past | comments | ask | show | jobs | submit login

> It baffles me that there are still so many services that try to 'automagically' intuit which language someone wants to have a service in, instead of just simply .. asking.

My experience is that language/locale implementation for a big project is so complex that PMs like to handwave the language selection part away. On a recent project I had to go back and ask, "What if an english-speaking user is traveling in Germany, do we show them the German-language site? What if a German-speaking user is traveling to France, do we show them English (since we didn't have an FR localization)?"

Confounding the issue is that many implementations combine locale with language, which can be a problem if you have locale-exclusive features. As a made-up example, maybe Cortana's contract for stock data specifies it can only be used in the US, and you're a US-based Spanish speaker. But Cortana assumes Spanish == Mexico, so if you use Spanish now stock quotes don't work. It's really attractive to just call those problems edge cases to be worked out in the next release.

(I think Etsy handles this really well, you can specify ship-to location, interface language, and currency separately. Although for some reason they auto-detected me, in the Bay Area, as UK, EN-GB, CAD which was strange. Obviously some work to be done.)




When I was in China for a while, a frustrating thing was that many websites I've visited often started assuming and practically insisting that I knew Chinese. There was more than one site that I couldn't figure out how to switch back to English. I checked that my browser was still giving the "Accept-Language: en-US,en;q=0.5" header, but clearly websites know better than me.


Accept-Language is fun. I have an accept-language that orders them en, ja, other. aa.com (American Airlines) then uses that to display the content to me in English, except dates and times which always appear in Japanese (12月25日 午後1時10分). Fun times.


For a while I had my system language preferences set as en-UK, ja, en-US and every so often I'd get an installation that was in Japanese because there was no UK English version.


The country code for the United Kingdom is GB, not UK. There's no such language code as en-UK. British English is designated en-GB.


That sounds correct behavior to me. You should add a plain "en" before ja.


Is that a problem? It sounds like what you asked for.


Some browsers used to send a default Accept-Language that specified English without asking the user (and, IIRC, even if the UI language of the browser was different). Thus, many sites still ignore those particular values of Accept-Language. This seems to be one of them.


There are definitely more web browsers in China that have the Accept-Language header wrongly set to English, than there are English readers there who want English. So the websites may not know better than you, but they know better than the majority of the web browsers. It's not perfect, but they are making the correct general decision IMO.


> web browsers in China that have the Accept-Language header wrongly set to English

How? Seriously, how? Assuming the browser's interface is in Chinese, the Accept-Language header should be set properly.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: