DocType
This:
<meta
http-equiv="Content-Language"
content="en">
Defines the encoding of the whole
page as English as far as the language
set goes - in short, it tells the user
agent (browser) to expect English language
characters. It's purely a technical
declaration. There can be only one
language declared in this tag.
Other Tags
The lang attribute
applies to all HTML tags except
applet, base,
basefront, br,
frame, frameset,
iframe, param
and script.
I find it most useful in the HTML,
DIV and SPAN tags.
This:
HTML:
<html lang="en">
-or-
XHTML:
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" />
Tells the visitor/search
engine what audience the text is
intended for.
It's perfectly possible for the
meta http-equiv and html lang tags
to be out of sync - for example, I
declare the technical language of my
Canadian websites to be English, but
will have French and English on the same
page at times, both with properly
declared language tags (the language can
be declared in spans, divs and other
tags, not just the HTML one.
From a search engine standpoint, the
most useful declaration of a language is
via the HTML, Div, or Span language
declaration, which describes the
intended audience, rather than the
meta-equiv, which only addresses the
software that renders the language (i.e.
the browser).
Naturally, both should exist and be
proper, but the SE would only look at
the language declaration of the content
intended for the visitor, not the
technical declaration of the document
intended for the browser, as far as
returning results to a searcher is
concerned.
Reference:
http://www.w3.org/International/questions/qa-http-and-lang
Multiple Languages
A document can declare more than one
language or language group for a
visitor, but only one for a user-agent
(browser).
This means that the meta
http-equiv="Content-Language" tag
can only reference one language - i.e.
"en"
The Lang= or xml:lang=
tags can reference several languages -
i.e. "en, zh, pt, fr" or even local
variants: "en-us" (US English).
One method of having more than one
language on a page is by using the DIV
or SPAN language attributes:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<DIV Lang="en">
Let us drink a carbonated beverage and
sit on this chesterfield, ok?
</DIV>
<DIV Lang="en-us">
Let's drink a soda on the sofa, hey?
</DIV>
<DIV Lang="en-ca">
Let's down a pop on the couch, eh?
<DIV Lang="fr">
Buvons une boisson carbonatée et
reposons-nous sur ce Chesterfield.
</DIV>
This lets you tell the browser what
to expect, but lets a search engine or
screen reader how to deal with certain
blocks of text.
Case
Language and country codes are NOT
case sensitive.