6 ms·
I just followed your link on an English-language website (Hacker News) in response to an English-language comment (yours) on my iPad (running in English, my mot
by stevoski 10y ago
I just followed your link on an English-language website (Hacker News) in response to an English-language comment (yours) on my iPad (running in English, my mother tongue and main language) while in Spain (where I live)
Your site was presented to me in Spanish. Please don't do this. Don't choose a language for me based on my location.
- _audakel 10y agoYou are probably an outlier, in that majority of ip requests coming from spain are going to want spanish. it makes sense to render default in spanish. I am not sure what headers your ipad is sending, but i doubt it sends what your language preference is. (i could be wrong) also, as previous sites don't add the chosen language in the click request, i don't see how being on hn previously is relevant. the flip side to this is - if this is actually a big problem (incorrect renderings of language) maybe some dnn could be applied for a new start up idea! haha
- stevoski 10y agoI'm an outlier indeed, but plenty of people live or travel in countries that use languages they don't speak or prefer, and don't want find themselves redirected to websites they don't understand. Spanish speakers (in Spain at least) tend to come from google.es, which prefers Spanish-language results, or from Spanish language links and discussions. It is wrong behaviour to choose my language based on my location.
- personlurking 10y agoGoogle.es doesn't seem to work that well, in certain circumstances. I often write in Portuguese and when I do searches with words in that language, the results come up almost entirely in Spanish (even when placing the phrase in quotes). Given, they're "similar" languages, but I would think Google would recognize "não" (no), for example, as belonging to the Portuguese language (especially since it's the only language that uses that word).
- matt_kantor 10y ago> I am not sure what headers your ipad is sending, but i doubt it sends what your language preference is. (i could be wrong) You're wrong. :) This is what the Accept-Language header is meant for[1]. AFAIK it is sent by most modern browsers, although as the referenced MDN article explains it isn't always an accurate reflection of user preferences. I'm not sure how iOS Safari in particular sets its value, but I would imagine that it is based on the current OS language setting. [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-Language_header https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_ne...
- drusenko 10y agoThis one is really tricky. You'll see this same behavior by Google, Facebook, and most other major providers. We spent a lot of time looking into this, it's unfortunately a very complex situation: 1- In theory browser language should be the perfect way to do it, in practice as often as 25% of the time or more it's set incorrectly. Unfortunately, that means a lot of people that don't speak English end up with English content. 2- There is more than just language, in several regions we are localized and not just translated. So it's important to send specific content for the region, like prices, specific local features (e.g. payment methods), specific photography to better appeal to the local audience, local user stories & articles, etc. 3- It's especially hard with English because that is, in essence, the "default" language. If your browser language is set to Spanish and you live in Germany, we'll respect that, but it's a bit harder to do with English. We're definitely open to input on how to handle it better... One step forward would be to bring the language selector up to the top of the page so it is much more accessible.
- stevoski 10y agoThanks for your response. It is indeed tricky, as I know from both sides of the situation. I don't think this behaviour is as prevalent as you suggest. I just checked Facebook and Google from a newly opened "private browsing" tab and both gave me English versions.
- drusenko 10y agoInteresting. I experienced it differently myself (while I was traveling, both Google and Facebook would show me local language, regional sites), as have others we've tested with. We've done a bit of research into how others do it to come to this point, but it looks like we should dig a bit deeper.
- fergyfresh 10y ago[Accepted-Language] in the HTTP header and the location based on the IP address (Google has a super easy API for this) is the easiest way that I could think of. Both are pretty easy to implement as I have done both before.
- personlurking 10y agoI had the same thing happen to me, verbatim (ie, in Spain). To make it worse, I'm on a slow connection so after several tries to get it to load - in English to boot - I gave up. Will have to remind myself to see it tomorrow when I go to a cafe w/ wifi.
- invertedohm 10y agoI'd like to second this, while also noting that a side-effect of this noodling-with-languages is that my fully English OS and browser is getting a page with some content (full paragraphs!) in Dutch, while other content is in English. On the same page. An interesting bug, but not one that inspires confidence.
- fergyfresh 10y agoIf you look at your http request headers @stevoski do you have more than one [Accepted-Language]? Is one of them Spanish? Also, @drusenko (forgot your name on HN)[Edited to add his name], it SHOULD be pretty easy to change your code to switch languages based on [Accepted-Language] and still do localization for payments/time/calendar stuff like that. PM me if you want.
- NetStrikeForce 10y agoThe worst case of this I've found was Waze. Android phone in en-gb. Play Store account from UK. Download Waze while in the middle of France, get the voice indications in French. Who's the clever cookie that decided that? :-)