IP geolocation is a bad way to select a UI language
zakwilson.posterous.com
zakwilson.posterous.com
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.
It is _the_ way to select the default language.
http://audacity.sourceforge.net/
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.)
The PHP source code is CC-licensed. Here's the most relevant file: http://audacity.cvs.sourceforge.net/viewvc/audacity/htdocs/i...
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).
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.
I'm all for the first but really do not like the second.
And no, I'm probably not representative, but then again, everybody is a 'niche of one'.
That's why I'm all for empowering the user.
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.
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.
http://googlealready.com/ (plug)
These days I use bing though, but that service is still online.
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.
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.
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.
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)
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 a frequent international traveler, I would definitely appreciate a setting that permanently locks my Google to the US site in 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.
When in doubt, ask, don't assume.
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.
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.
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.
My old rant is here for those interested: http://www.gnegg.ch/2008/09/automatic-language-detection/
http://www.ordecon.com/2007/06/11/why-geolocation-by-ip-suck...
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.
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.
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!
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.