[thelist] [language] Is it supported well?

Ned Baldessin ned-ml at idsland.com
Mon Aug 4 10:04:19 CDT 2003

> 1.  Are the language codes backed up by some extended ISO standard?  I found
> http://www.w3.org/WAI/ER/IG/ert/iso639.htm but it's doesn't appear to be the
> same list as you find in IE/PC and Moz/PC. Those browsers not only include
> just a subset of the languages, but also localizations of many languages
> (example, en-jm for English/Jamaica).

As is said here <http://www.w3.org/International/O-HTML-tags> :
Language codes are defined in RFC 3066 , which obsoletes the older RFC
1766 . XML has been updated to use RFC 3066 by an erratum . RFC 3066 is
based on ISO-639 two-letter and three letter language codes , and on
ISO-3166 two-letter country codes. RFC 1766 did not include three-letter
language codes. 

> 2.  What is the browser support like for these headers?  Any major browser
> not fully support these headers?

I don't have any hard facts, but in my experience the answer is yes. The
real question is more like : does this setting reflect the users choice,
or is it simply the default value set at installation.
I remember that in MacOS 9, you had to manually set the language, even
if you sytem-wide language setting wasn't the default value for the
newly downloaded browser. This is not the case anymore on MacOS X.

> 3.  Anybody have any negative sharable experiences with trying to use these
> headers to automatically select a default language?

I'm currently working on the I18N of a site, and I proceed like this :
    - if the variable $lang is set, then I store it in a session
variable, and thats it. The $lang variable is managed by my CMS, it's
set when the user asks specifically for a translation of a document in a
specific language. I assume that the user wants to stick to the chosen
    - if I don't get any $lang var, then I check the accept-language
header, and if I find a correct language I store it in a session
variable. You should really loop through all the languages in
accept-language (there can be several, in order of the users
    - In all other cases, I fallback to a default language for the site.


More information about the thelist mailing list