There are four steps:
The browser writes a value for the Accept-Language request header field that it sends to the web server. You can set this value in Preferences (Netscape) or Internet Options (Internet Explorer). If you choose multiple languages, they are sent to the server as a comma-delimited list in your preferred order.
With the settings above, the request header field will be Accept-Language = de,en-us,it,fr,pt-br,es.
How does the web server determine which language to serve? Is there a naming convention for multi-lingual web pages?
Deciding which page to serve is called content negotiation.
Tim Berners-Lee's discussion of generic web pages and their language variants describes two different naming conventions, index.fr.html and index.html.fr.
The Apache Web Server 2.0 compiles in content negotiation (the mod_negotiation module) by default. It postpends the two-letter language code to the URL and looks for files to serve.
For example, if you set your browser preferred language to French and browse to http://www.openinternetlexicon.com, an Apache server would look for the file www.openinternetlexicon.com/index.html.fr.
Unfortunately, postfixing the language code is not as desirable as infixing it - index.fr.html - which allows the server's operating system to use a familiar extension. The Apache docs on content negotiation say that you can choose between naming conventions, because files can have more than one extension, and the order of the extensions is normally irrelevant (see mod_mime documentation for details). We suggest infixing the language (and other) variants.
Microsoft Internet Information Server negotiates language with an optional ISAPI filter. There does not appear to be a standard ISAPI filter for language negotiation on the market.
Do web servers handle multi-lingual requests automatically?
Not normally. The web server must have multiple language versions of a web page in order to serve them. It needs to know how the language-variant web pages are named. Besides naming them with a URI (index.fr.html), it may be possible to transmit the language variance as metadata in the HTTP header. This is the direction of the WebDAV protocol being developed by the IETF.
PlanetarySales.com offers an ASP or Java component ($499) that allows a web server to respond with a page in the language that the browser requests. But this can be done on the server with Active Server Pages (ASP), or with JSP, PHP, or Perl, as this site shows.
What are some example sites that serve multi-lingual pages? Do they recognize the browser language request?
There are many multi-lingual sites, but most ask you to choose your language from their home page. Few respond to your browser settings for a preferred language. Google, the search engine, does, and in several languages. Another is Alis Technologies (only in French and English). planetarySales.com responds to requests for English, German, and Japanese.
An Apache 2.0 web server default installation supports several languages. Your browser must be set to a non-English language to see these work.
Do you know of some exemplary multilingual sites that we should list? Send us their URLs.