FAQ: Why should I use the 'lang' attribute?

Questions for GEO
- Is the new structure an improvement? (The old one was a while ago, so you may not remember...)
- Can you help with any square-bracket questions?
- Please email comments, etc, before the next meeting, so that I can incorporate them before then.
Thanks in advance.
Deborah
--------------------------------
QUESTION
Why should I use the 'lang' attribute?
The 'lang' attribute contains information about the language(s) used in the web page.
The 'lang' attribute should be used to indicate the main language of the web page; it should also be used to indicate any change of language within the text.

ANSWER
The 'lang' attribute is required for accessibility and it is becoming increasingly important and useful for rendering the page as appropriate for language and locale.
In addition, the 'lang' attribute is useful for search engines, spelling/grammar checkers, XML [what kind of tasks?]. 
Using the 'lang' attribute will help to future-proof your web pages. 
The 'lang' attribute will improve the user experience for those using the web in a language other than English.
Implementing the 'lang' attribute is easy (http://www.w3.org/International/O-HTML-tags.html).
Accessibility
The 'lang' attribute assists speech synthesizers and Braille translators; it is required by the W3C Web Accessibility Initiative (WAI) and enforced governmental policies in some countries, eg, UK - Disability Discrimination Act (UK) [other countries? contact WAI? and/or specifically request this information from users - useful way to get people more involved?] 
Page rendering
CSS2 uses the 'lang' attribute powerfully as a pseudo class.  (http://www.w3.org/International/questions/qa-css-lang.html).
Unfortunately it doesn't work in IE yet.  But the concept of language specific styling is a very powerful one. [Need to add some examples.]
Search
A common use for meta is to specify keywords that a search engine may use to improve the quality of search results. When several meta elements provide language-dependent information about a document, search engines may filter on the xml:lang attribute to display search results using the language preferences of the user. (http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-meta.html)
XML
The 'xml:lang' attribute is the standard way to identify language information in XML. [Information about tasks]

USEFUL LINKS
HTML 4.01 Specification W3C Recommendation 24 December 1999: http://www.w3.org/TR/html401/struct/dirlang.html#h-8.1.3.

XHTML 2.0 W3C Working Draft 5 August 2002 http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-meta.html

Web Accessbility Initiative: lang attribute - http://www.w3.org/TR/WCAG10/#gl-abbreviated-and-foreign

Tutorial: Language markup in XHTML and CSS (DRAFT): http://www.w3.org/International/tutorials/tutorial-lang.html

Authoring Techniques for XHTML & HTML Internationalization: Specifying the language of content 1.0 - http://www.w3.org/International/geo/html-tech/tech-lang.html

FAQ: Styling using the lang attribute: http://www.w3.org/International/questions/qa-css-lang.html

FAQ: Two-letter or three-letter language codes: http://www.w3.org/International/questions/qa-lang-2or3.html

From the usability perspective: http://diveintoaccessibility.org/day_7_identifying_your_language.html
An interesting view on Google usage across cultures:
http://www.google.com/press/zeitgeist2003.html

http://www.google.com/press/zeitgeist.html

 

BBCi at http://www.bbc.co.uk/


This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

Received on Saturday, 20 March 2004 14:07:24 UTC