Jump to the millipedia homepage

Mind my language

I know from experience that building a multi-language websites can get very complicated. Not so long ago we built an interactive website as part of a European wide campaign for Friends of the Earth (no longer online so, no, you can't see it) in 24 different languages including right-to-left (RTL) and non-latin alphabets. It was fun...

One difficulty was deciding what to do when you don't have the same content in each language; do you drop back to a default language (English in our typically Anglo-centric version) or maintain versions of the site with different content and all that implies both for layout and accessibility.

An equally important decision is what language to present when a visitor first arrives at the site.

This is is my mind at the moment because I just visited the Creative Commons site to make sure I selected a suitable license for a our friend Lucy's new site and got presented with this:

The Creative Commons site in Dutch


Now I can just about scrape by in Dutch (I really, really hope that's not Flemish otherwise I'm going to look like a proper Little Englander), but really that's not making it easy for me.

Quite why Creative Commons have decided I want to see their site in Dutch I don't know.
My browser language is set to [en-gb] (English/United Kingdom), geolocation for my IP resolves to London (close enough) on at least one service and I don't have any language preferences set in cookies or the like.

Since I can't see any client side atempts to find my location I'm assuming that the Creative Commons site is doing a lookup on the server to work out what language to serve me. And this might be where it's falling down.

The first service I used to look up the location of my IP address was Hostip.info which is a community-based project to build a geolocation database. It came back with this response:


We haven't a clue


which is at least a refreshing response but not that helpful.

It looks as if Creative Commons have tried to locate my IP and either failed to get a response or received an incorrect response. They've then decided that the best option for me is Dutch.

At the bottom of the page is an option to change languages, but slightly unhelpfully the instruction telling you this is ... of course ... in Dutch Deze pagina is beschikbaar in de volgende talen:

Even if your IP geolocation is working smoothly, or if you rely on the language string of the browser you still can't be sure of this being the language that your visitor really wants.

An obvious example is when your little Englander is sat in a Dutch cafe and wants to check their Creative Commons licenses before they go out and get a copyrighted tattoo. They can't really be expected to know how to change the language settings of a strange browser even if they have permission to do so.

Instead of trying to guess what language is required by a user we can of course let a user pick their own language. Most commonly this is done by displaying a list of languages in the header of a site. Very often this is presented (and yes we've done this ourselves in the past) as a row of national flags.

This method isn't perfect of course, even if we assume our users know what their national flag looks like. Before the user has made a decision we need to present them with a default language (yep probably English again) which has already alienated your non-English speaking user. We then need them to make a choice and we then need to handle how that language preference is stored.

Storing it in a cookie means both that we need our user to have cookies enabled and also means that they won't be able to send the page as a link in the correct language. Storing it as a request parameter on the URL is better but apart from just plain looking ugly it also means we have to be able to deal with it server-side.

One neat way to handle the dilemma is to do what Wikipedia do. They have separate subdomains for each of their languages.

If you go to www.wikipedia.org then you are presented just with a page offering the major languages available, with instructions in each of those languages (Sorry Dutch you aren't one of their main languages but you are there in the drop down list at the bottom of the page).

Once you've made your choice then you're sent off to the relevant sub domain. So English is en.wikipedia.org and Dutch is nl.wikipedia.org and so on. This means I can share my bookmarks of interesting Wikipedia pages with my fellow monoglots without worrying.

It's still important that you make it easy for users to change languages but that can be done with some thoughtful design.

Or we could all learn Dutch.

May 8, 2012