E-mail List Archives

Re: This week's article: Content Language


From: Jukka K. Korpela
Date: Jan 23, 2006 9:00AM

On Mon, 23 Jan 2006, Dejan Kozina wrote:

> The lang attribute of the html element can have one language only
> declared.

By definition, yes.

> If the document is a multilanguage one (say a splash page on a
> multilingual website where you ask the visitor to choose his/her
> language)

There should be no splash pages.

> and you can't or won't select one language as primary (think
> countries with more that one official language, say Canada or Belgium)

Any choice for primary is better than a splash page. Besides, you can use
language negotiation at the HTTP level to decide on the primary language
according to user preferences as expressed by the browser. See

> you can left this one out and mark directly the relevant sections of the
> page with their own lang attributes.

No, the lang attribute should not be omitted from <html>. Instead, a
bilingual document should have one language there and the other language
in lang attributes for the elements in that other language.

There should normally be no _sections_ in another language. Links to
versions in other languages can hardly be classified as sections.

Say no to bilingual pages. They confuse people and alienate them. Even in
a "bilingual" country, most people find text in the other language at
least mildly disturbing when it appears along with a text in their native
language. Sometimes brochures and booklets are bilingual to reduce costs,
but there's no reason to repeat the idea on the WWW. Just write two
monolingual pages and link them to each other. (Rare exceptions include
dictionaries and scholarly works containing quotations in other than the
main language.)

> There is also a 'Content-Language' HTTP header (with optionally the relative
> 'meta http-equiv' element)describing the languages in which the document is
> revevant: this one accepts a comma separated list of languages.

I have yet to see any evidence of actual use of that header by browsers.
I haven't seen it much in actual HTTP headers either. I know that web page
creation software spits out meta tags containing imitations of such
headers, but it seems to be pointless technobabble.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/