How to test for lang / xml:lang recognition?

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?

RI



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


============
Richard Ishida
W3C

contact info:
http://www.w3.org/People/Ishida/ 

W3C Internationalization:
http://www.w3.org/International/ 
 

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