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?

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:03 GMT