Jürg Stuker wrote his thought about language selection on Web sites (in German). This was followed by some good and constructive comments. Bernhard Seefeld followed this up by commenting on the search.ch solution.

A short summary of Jürg’s post:

  • The user decides actively what language he wants (if necessary by showing a language selection page before going to the content)
  • The user only has to decide once
  • The switch is in the top right corner. Always.
  • Don't use flags but text for language switch links
  • The laben consists of at least two characters and is written in the target language (so you always write Deutsch, Français, English, Español, ???, etc.)
  • The language is contained in the URL - don't use query string parameters

So far I didn't like the solution which Apache content negotiation dictates. But how it's implemented on search.ch and described in Bernhard's posting, I actually think it makes sense. First let me quote my comment on Jürg's weblog:

Gebe dir in fast allem recht. Nur vorgeschaltete Sprachauswahlseite finde ich uncool und ersetze ich mit Auswertung von Accept-Language. Wenn man damit 80 Prozent der Benutzer an den richtigen Ort geleitet hat spart man denen bereits allen einen Klick. Und die anderen 20 Prozent haben auch nicht mehr Klicks als mit Auswahlseite.

Ich vermute aber sowieso, dass man mit der Methode weit über 90 Prozent bereits ans richtige Ort leitet, da sehr viele Benutzer den Browser in ihrer Standardsprache verwenden und eben an den Default-Einstellungen nichts ändern.

Die Content Negotiation Methode von Apache finde ich eigentlich ganz gut. In der Praxis hat sie aber den Nachteil, dass aktive Sprachauswahl genau nicht berücksichtigt wird. Debian.org verwendet diese Methode. Wenn ich da auf einer Seite von Spanisch (meine Standard-Sprache) auf Englisch umstelle, erscheint die nächste Seite doch wieder auf Spanisch. Das liegt daran, dass Links nie auf eine explizite Sprachversion sondern immer auf die unqualifizierte Version des Dateinamens zeigen. (also auf index.html und nicht auf index.en.html).

So to summarize and translate this: I think Jürg's points are valid, that automatic language selection based on HTTP Accept-Language is a good idea (if it can be manually overriden by the user) and that Apache's content negotiation doesn't work in practice while it sounds very nice.

As an example of content negotiation gone wrong I used the Debian Web site. My browser is set to Spanish, German and English (in that order). It's this way, because I really want to browse most pages in Spanish when possible (in order to learn that language) but sometimes have to switch, because I don't understand it. And it turns out that on the Debian Web site I have to switch occasionally. Now after I switch from the Spanish language to the English (or German one), all links are language neutral again. So when I click a link I get back to the Spanish version and again have to switch to my current language of choice.

The search.ch solution solves this and remembers the user's decision. Links are also automatically constructed to point to the right target. But let me quote Bernie on that:

But the interesting details are within the initial detection and the URIs. An URI could end in help.html, but also in help.en.html; exactly how Apache content negotiation suggests, i.e. the first one would trigger automatic language detection, the second one is fixed on english. The important difference is in how the links in these pages look. We took great care (and credit for this goes to Urban Müller) to keep the links on those documents in the same style. That is, the help.html document would come in the user's language (e.g. german) but wouldn't contain language links (e.g. .de.html). Thus, the url would also reflect the information the user put into the system: The language was only set if it was actually overrided by the user.

My conclusion is, that automatic language detection is okay (and should be done) but when the browser and the user disagree, the user's decision should be worth a lot more. Though I think I may review this opinion based on Peter Hogenkamp's comments. He knows quite a bit about usability. In the comment he writes about how the Web site of Swiss International Airlines always defaults to English and many users don't switch to their language (this was actually tested with users):

Der doofe User kann ja jedes Mal die Sprache wechseln. (De facto macht er das nicht, sondern er kämpft sich durch, selbst wenn er gar nicht so gut Englisch kann, wie wir in einer Testserie für die Netzwoche gesehen haben, mit den zu erwartenden negativen Folgen.

But Swiss violates my main point: use Accept-Language for initial language detection. So I'm currently not prepared to accept the example of Swiss as an example against my basic rules. I'm stating them again here for quick reference (and will notify you should I change that opinion).

Automatic language detection is okay (and should be done) but when the browser and the user disagree, the user's decision should be worth a lot more.