Content Negotiation

How Does the Server Know Which File to Serve

You will notice that internal links don't end in .html. This is because the server is using content negotiation to decide which version of the document to deliver. When there is more than one choice, the server will make a list of all possible files to serve, e.g. if the request is for 'about', then the list of completions might be about.en.html and The default for Debian servers will be to serve the English document, but it is configurable.

If a client has the proper variable set, for example to serve German, then in the example above would be served. The nice thing about this setup is that if the desired language is not available, a different language will be delivered instead (which hopefully is better than nothing). The decision on which document is served is a bit confusing so instead of describing it here, you should get the definitive answer from if you are interested.

Because many users will not even know of the existence of content-negotiation, there are links at the bottom of every page pointing directly to the version of that page in every other language available. This is computed using a perl script called by wml when the page is generated.

There is also an option to override the browser language preferences using a cookie that prioritises a single language over the browser preferences.