Re: identifying changes in language

Charles McCathieNevile <charles@w3.org> wrote:

> The CSS2 selector [lang] can be used in HTML to identify elements which have
> a lang attribute. In XML languages which implement the xml:lang attribute the
> equivalent selector is [xml:lang]

You may also use :lang() pseudo-class.

> Note that it is also possible to select for particular languages - for
> example (if I recall the syntax correctly) [lang ~ en] selects languages
> which include the sequence "en" - primarily english,

No, you should use [lang|="en"].  This attribute selector was
specially designed for hyphen-separated list of values, such as
language code.

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Wednesday, 24 November 1999 13:02:08 UTC