Many web sites around will use techniques to try to discover automatically a user's preffered locale when he accesses the site for the first site, in order to provide the user with content in his native language, for example.

There's nothing inherently wrong with this, but I don't personally like it. For example, one such site is the Microsoft Knowledge Base: Go directly to a KB article, and the site will present me with the article in spanish (most of the time a crappy automated translation that's useless, but that's besides the point). I can honestly sympathize with the intention of the site designers, but the end result is extremely annoying to me as a user.

Here's the deal: While I am a native-spanish speaker, and I live in a country with spanish as the official language, I rarely want to get to the spanish version of a site like the MS KB. One of the reasons is simply personal preference, but most significant is the fact that there are many variations of spanish around the world, particularly when it gets to technical jargon. Here we tend to use the english words for a lot of things, even if there are spanish translations for them. Thus, when I get to, say, a spanish KB article, I have to do a lot of effort just to understand what it says because it uses a lot of terms I'm not familiar with. It's ironic, but it actually means it's easier for me to understand the english site than the spanish one!

Because of things like this, I hate sites that try to guess where I am and provide the translated content. I much prefer sites to ask me if I want translated and locale-specific content and from where and then save my prefference, instead of blindingly trying to guess what I want. This is particularly true with poorly implemented sites such as the MS PSS site, which doesn't use consistent rules for presenting translated content (for example, for me right now the main site will show me english text while the KB articles will present in spanish; makes no sense).

When we set out to create our company site, we needed to provide localized content in English and Spanish, and we explicitly decided to go with a different approach: Don't guess, let the user decide. You want the english site? fine. You want the Spanish site? Fine as well!

Instead of saving cookies with your preference, we took advantage of URL rewriting and the localization facilities in ASP.NET 2.0 to provide what we consider a superior alternative: The english site is under the /en/ relative path, while the spanish one is under the /es/ site. Once you've selected the language you wanted, all links consistently keep you in that same language (the power of relative URLs). There's no need to mess with cookies, no need to fuss with query parameters or any other thing like that.

An added benefit of this is that it is very easy to link to a page in a specific language you wanted, since the page URL in the browser clearly establishes which version of the site you're viewing, you can just copy & paste directly!. Bookmarking it will work just as well.

Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.