One of the better ways I think is to look at the localization settings as reported by the browser, use those as a default and allow the user to override this in an easy way.
The header that contains this information is:
Accept-Language:
If you're into php this is the variable you'll need:
$_SERVER["HTTP_ACCEPT_LANGUAGE"]
Other platforms will have their own mechanisms to reach the headers as sent by the users browser.
Make sure that it is easy to change because your user may be more comfortable with a different language than the one that the browser reports, for instance the user could be a Spanish tourist visiting Sweden and using an internet cafe in Stockholm.
By default it uses the Accept-Language header, but the user can override this by clicking a link in the footer. Clicking the link sets a cookie, so that the user's preference is remembered on subsequent visits. The link also acts as a permalink to the page in that language, so that they can be bookmarked or indexed separately. Localization is done with gettext. (Sadly, most of the translations have gotten out of date in the four years since the site launched.)
True. I remember when Pirate Bay implemented it and changed the language to Malay for me and I have to manually change it back to English. The internet, especially an international torrent site where 99% of the stuff posted are in English, is better read in English. Making it in another language is just plain annoying. If you want your audience to know that an option to change languages is available, just makes it more visible. Larger icons or a more prominent placing. Let the user choose, don't make the decision for them. If you make the decision for them, you are just insulting the user's intelligence and at the same making yourself look stupid.
Usually, when I use google I look for english content, even though I live in a spanish-speaking country. It really bugs me when I go to google.com and get redirected to the local version. It bothers me not only because I'm looking for english content, but because Google localizes search results yielding a lot of unrelated or not so relevant stuff.
I do exactly the same. My reason is simple, most of the information that I use on a daily basis is simply not available in my native language. So why bother with it at all, simply search in English, 99% chance to score in one or two searches. If those really don't work the chances of finding it in my native language are practically nil.
The only exceptions for this are local news and information about hardware that has been customized on a per country basis (HP does a lot of this).
Now, for both you and Nico... ask yourself whether you (as a 'Hacker') are representative for 'most internet users in your country'. I think a website should be easiest in use for the biggest group of users.
As for me: I can get annoyed by behaviour like this but I'll always remind myself I'm not a 'regular internet user'.
As for most people I know: A lot have a dutch localization for windows and a dutch localization for Firefox/Chrome/IE. Quite a few (about 30%) have an english localization for their browsers (either because they have an english localization for windows or because they like 'consistent menus across all applications'.
I do agree with the author that geolocation should not be the first choice (cookies should be) but as a second choice it's better than the 'Accept-Language' header.
You are right, I'm probably not representative of most internet users in my country, but my OS and browser are in English, so it would be easy for Google to pick that up (or my cookies) and act accordingly, instead of redirecting me to the local version.
I don't think that works. Lots of people use a pirated OS. In Asia 99% of the people are using a pirated Windows, sometimes in English.
One of the software I've developed in the past auto-selects the user interface language based on Windows's own language. There had been at least one incident in which a customer complained about this; he was Filipino but was using a pirated Arabian Windows XP.
I'm all in for empowering the user too, but then again, it's all about the defaults.
In my experience power users find features like the 'change language button' a lot faster and easier than the average user. Even the tiny flags in the top-right corner of most websites go unnoticed for most people.
A 'regular internet user' doesn't even bother with the settings and/or is probably unaware of localization of search results. This doesn't mean she wouldn't get better results by searching without localization (assuming she's an english speaker).
What's worst is google for some reason changes back the settings to localized at what appear to be random intervals. The only definite working solution I've found is to use a US IP address to proxy from.
Thanks, whenever I get redirected to a local version of Google, I use that link, it's placed at the bottom right of localized Google home as "Google.com in English".
All I can say is sorry. Yeah, the technology is my creation although Google doesn't use my old company's technology anymore (long story). I always tried to educate users with the proper way of implementing and using IP targeting. Doesn't mean they ever listened.
Yeah, it's actually a lot more difficult than one would think. Heck back in 1999 I thought it'd be pretty easy. The Internet is pretty wily when it comes to this kind of stuff.
I'm a bit surprised at this whole thread. I used to do some internationalization at Google, and the old policy was that cookies always trump geolocation. Maybe there's been changes.
Incidentally, Accept-Language was not always respected either, but that was deliberate -- it used to be considered an unreliable signal, especially in some markets where the user's OS was often non-localized or pirated. But I've heard that in these modern times it's more indicative of real user preference.
Geolocation is bad for detecting the language, the HTTP Accept-Language header is better for that. But Geolocation can be good for localising content. If I'm in Germany and search for fast food, I want to see the results in English (if possible) but they should be about German businesses.
It's impossible to get it right though because you need to decide what the user wants to see localised vs always in their home locale. Maybe another header that you could set per site like "Accept-Content-Locale" or something.
And of course, both the Accept-Language and GeoIP methods fail miserably at determining things like the user's time zone. There really should be a "home" and "roaming" locale system in browsers that sends the preferred language, time zone, localised content preference, and anything else that could be useful in generically customising content. The user could set the locale browser wide or per site.
A way that I think would be useful is, presuming you're on "fastfood.com" and not "germanfastfood.com", have a search box where you enter the food (pizza) and a location, which would be automatically filled with the GeoIP location, or blank if you can't determine.
That way it's helpful if you are in Germany, but you can change it easily, and aren't forced into it (it's more of an opt-to rather than opt-out)
Facebook does this. I was in Costa Rica on vacation, and went to Facebook once just to accept a friend request, and all friend requests started showing up in my email as Spanish. I know I could have changed the default, but the internet was slow, and I didn't have time. It was on an internet cafe Ubuntu machine that I checked was set to American English
I took my laptop to Mexico and visited Facebook once; it's been entirely in Spanish ever since. The hundreds of visits from the US before and after make no difference.
I'm sure it's possible to change, but it's sort of amusing to get all my FB email in Spanish. Even if you don't speak the language, FB does like two things anyway, it's not confusing.
As the comments on the original article mention, Google seems to be answering two different questions with geolocation. The first is which of their localized web sites to display. The second is which language to display that site in. Defaulting to the localized site almost certainly helps them comply with local censorship laws, as well as offering culturally and geographically relevant content. Once you've made that choice, displaying, say, Google Japan in English might not make very much sense, so I can see why Google has merged them.
As a frequent international traveler, I would definitely appreciate a setting that permanently locks my Google to the US site in English.
A bad way to select it for the user by default, yes, but it is a good way to help organize the drop down list by having the geolocated language be the default selection.
When your manager was in France last week, how come when he pulled up the site on his Vaio, he was not getting the French language version? He even cleared his browser cache and still got English!
Engineering can explain there is a standard way to know an HTTP client's preferred language: the Accept-Language header, and that your server already supports it: Apache had mod_negotiation activated when you first installed it, but it doesn't matter. You now have a high-priority IP geolocation/geotargeting project to do.
This sounds like the same disease that made MSIE disregard MIME type headers.
Here's a simple way to detect the UI language (for glocalization): ask your visitor for their choice. It only takes a few seconds, and it's much more reliable.
I know from experience that there are a few issues with that too. First, how do you ask?
One way is to prominently display links to the other languages. You could put them in the top right corner of every page. You'd be surprised at how many users can't figure this out.
Ok, so maybe you give first time visitors some kind of popup, interstitial page or overlay thing asking what their preference is and save it for future use. So what language do you ask in? Besides, a very large majority of your users will be using one language- let's say English- so this is totally pointless for them. Imagine if Google or HN asked you for your language preference every time you cleared your cache. It gets annoying quickly and you could risk increasing your bounce rate.
A better way is to use a combination of detection, asking and then prominently displaying alternate language links. Identify some markers that may suggest a user wants a language other than the primary one. User agent string, IP geolocation, referred from a search engine where they did a search in another language, etc. Ask those users what language they would prefer; don't bother the others. The alternate language links are still available to the ones that slip through the cracks.
Best Buy does something like this on their site. Set your language preference to Spanish in your browser and visit the home page to see it in action.
Or assume a default language and then have a clear option to change to something else. That's the same number of clicks in the worst case, but less in the average case.
If you use the user agent string in combination with geo-location (and maybe a few other factors such as Facebook API or twitter API heuristics), you could lower the number of wrong languages using a sort of learning algorithm too.
So after reading through all of the comments people have left here and through some of the related links people have posted, it really sounds that most of the folks who think this is a bad idea are people who travel a lot or are above the norm in regards to tech. Face it, if you're reading HN, you're probably a geek in one form or another.
But the thing is, most people aren't. They want to go to a service and have it work for them. To talk about Google specifically, remember for a second that this is a company that is insanely driven by numbers. Remember that thing a few months ago where their lead UI guy quit because they did A/B testing on 30 different colors of blue? I can't confirm, of course, but I would put a lot of money on Google having spent a lot of time doing testing on language localization based across a lot of different parameters including user agent, geo IP, etc. And if they're using IP's, there's probably a good reason why they do.
I'll also admit that I'm an American English speaker. I can't speak a second language, but I can read Spanish(slowly) and I understand a bit of Haitian Creole if spoken slowly. The only time I've ever been out of the U.S. is to Montreal 10 years ago on vacation.
The site that pisses me off the most at the moment is ups.com. They never remember the language I select(English) and their UX is a freaking pile of crap. Every time I go their site, I get the same cramped little box where I have to pick a language. They are a prime candidate to use geo-IP detection given their global business, and yet they don't. I contrast them to Google because they're both global companies, but while Google has put millions of dollars into testing their products, UPS looks like they hired some interns 5 years ago to design their site and haven't updated it since.
I cant recall the number of times I have been cursing at a website, in particular Google, when I get the whole site presented in Thai characters. Wtf?! I can't read this stuff. Give me an English button and for once, please remember my selection.
I've ranted about this exact same problem a year ago and IMHO it goes even further than just geolocation for websites, but it's also a problem with desktop applications that use the locale to determine UI language which is inconvenient and in some times even confusing as it mixes the application's UI that's in one language with UI from the OS that's in another language - sometimes even in the same dialog.
One very useful way to get around this, specially when you use both a local and the global version, is to setup a keyword search for each in your browser (in Chrome and Firefox it's pretty easy).
So for example, if I want the english Google (hl=en), I have a keyword "g", and when I want local MX content (.com.mx, hl=es), I use gmx.
Of course it's still no excuse for Google (and other companies) to offer such bad user experience.
On a more serious note the author is right that it's highly annoying to be in a country where you don't understand a word and when looking for some familiarity you open the internets only to find out that they too have been translated.
Even if you were to open up the Google home page in Maltese or Welsh or some such language, I don't think it'd be too much of a challenge to work out what to do with it.
In the UK, it redirects me to google.co.uk (which, as a UK resident, is the site I want) if I request google.com. If I type in (say) google.de it takes me to the localised version. Incidentally, the German Google home page has an option to go to "Google.com in English" in the footer.
It's not so bad with Google; I know about google.com/ncr and I know how to get to the preferences even if I can't read any of the text. I chose Google because it's a very visible company, and one that should know better.
I find it pretty funny to be reading all these complaints about "IP Geolocation" in ENGLISH. Really these are all variations on: "Why serving non-English pages is bad for users who only understand English."
Well you are reading an English language site so the articles are obviously going to be in English. The complaint applies to anyone travelling to a country that speaks a different language. There are also comments from people in other countries who prefer to browse in English.
Funny story...I was taking a multi-week trip to Europe while meanwhile attempting to finish my submission for Advanced Rails Recipes.
No problem, I figured, I'll just use Google Docs to write it from internet cafes.
I got hit by this problem. I could figure out enough French to save my work and what not, but not enough to tell Google to show me Google Docs in English!
Here's the dilemma put simply: If you set language based on geolocation, you'll have a tiny handful of tech savvy nerds complain about you on the internet.
If you set it based on the Accept-Language header, you'll have a bunch of non-tech savvy users not use your site because they have no idea their language is set to English in the browser.
It's a tradeoff and, unfortunately, geolocation is the best of a bunch of bad methods to determine your language.
I absolutely despise 'location aware' software that assumes that because I've crossed the border, I want to speak that language. It happens to me with my iPhone all the time and its bothersome, frankly.
The header that contains this information is:
If you're into php this is the variable you'll need: Other platforms will have their own mechanisms to reach the headers as sent by the users browser.Make sure that it is easy to change because your user may be more comfortable with a different language than the one that the browser reports, for instance the user could be a Spanish tourist visiting Sweden and using an internet cafe in Stockholm.