W3C home > Mailing lists > Public > www-international@w3.org > April to June 2004

How to test for lang / xml:lang recognition?

From: Richard Ishida <ishida@w3.org>
Date: Fri, 30 Apr 2004 19:06:18 +0100
To: <www-international@w3.org>
Cc: "'Deborah Cawkwell'" <deborah.cawkwell@bbc.co.uk>
Message-ID: <E1BJcOw-0000rs-2u@dr-nick.w3.org>

Can anyone think of a general way of testing whether the language declared in an html tag is recognized by a user agent - that we can use in a test suite?

This would be particularly useful to test, for example, whether the langauge declaration in a meta statement has any impact on the document - my assumption is not, but I'd like to be sure.

The difficulty is finding a test that doesn't rely on some other thing working.

We could use a :lang selector to test for recognition, except that the test would fail on IE because :lang doesn't work.

We could maybe check whether fonts are applied in CJK (see for example [1]), but we can't guarrantee that that behaviour is widespread either.

Maybe a JavaScript routine could look at the DOM?

Any ideas?


[1] http://www.w3.org/International/tests/sec-cjk-fonts.html

Richard Ishida

contact info:

W3C Internationalization:
Received on Friday, 30 April 2004 14:07:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:40:49 UTC