W3C home > Mailing lists > Public > www-international@w3.org > January to March 2004

Re: How to organise a multilingual website

From: Chris Wood <chris@wood.name>
Date: Tue, 10 Feb 2004 14:54:18 +0000
Message-ID: <1076424858.4028f09a27112@www.chris.wood.name>
To: Richard Ishida <ishida@w3.org>
Cc: www-international@w3.org

With regard to initial language selection using Silos, it is possible to
automate this to some degree. We've done something similar in DotNet.

By taking the browser's accepted languages, you can take the first half of the
locale to get "en", for example. You then run this value through a select case
for each of your languages. If the language is found you do a server / meta
redirect to the index page of that particular language.

To increase the effectiveness of this in our implementation, we also set a
cookie where possible denoting the user's preferred language. Users' preferred
languages are also pushed back to the database.

A hierarchy is then established to determine which means has priority. For
example, most important is the cookie, then the user account then the browser's
accepted language. If a language can't be identified by ANY of these means, it
reverts to a default.

Note that this technique can be used at both server level (ASP.NET, PHP, JSP,
CGI..) or client (CD) level (Javascript), although server is more desirable.
It'll also work with database-driven content, should you ever decide to switch
to this approach.

Chris
Received on Tuesday, 10 February 2004 09:54:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:11 UTC