Meeting preread: Language declarations

Folks,

I have put together a first draft of a new FAQ that we should discuss in our meeting tomorrow.

http://www.w3.org/International/questions/qa-http-and-lang.html

The questions is "Should I use HTTP Content-Language or a meta element to declare the language of my XHTML document?"  

Following on and arising from those thoughts I have worked on a new set of techniques for the language WD.  See below.  Please send your comments, and if we have time, lets also discuss this tomorrow. These ideas break some new ground, and will also need to be reviewed by Core and others.



CURRENT VERSION OF OUTLINE

Specifying the overall language of a document
• Always declare the language of the page as a whole in the html tag.
• For HTML use the lang attribute only, for XHTML 1.0 served as text/html use the lang and xml:lang attributes, and for XHTML served as XML use the xml:lang attribute only.
• Do not use the meta tag to declare the language of a document.
• Do not declare the language of a document in the body tag.

Identifying in-document language changes
• Use the lang and/or xml:lang attributes around text to indicate any changes in language.
• For HTML use the lang attribute only, for XHTML 1.0 served as text/html use the lang and xml:lang attributes, and for XHTML served as XML use the xml:lang attribute only.



NEW VERSION OF OUTLINE

Declaring the language of content
• Unless there are more than one primary languages, always declare the primary language of the page in the html tag.
• If there are more than one primary languages, try to keep content in each primary language in a separate block, and always declare the language in the tags that define those blocks.
• For HTML use the lang attribute only, for XHTML 1.0 served as text/html use the lang and xml:lang attributes, and for XHTML served as XML use the xml:lang attribute only.
• Do not use a meta tag or HTTP header to declare the language of content.
• Do not declare the language of the page in the body tag.
• Use the lang and/or xml:lang attributes around text to indicate any changes in language.

Identifying the language of the audience
• Consider using a meta tag or HTTP Content-Language header to indicate the language of the intended audience for a page.
• If there are more than one primary languages, use a meta tag or HTTP Content-Language header to list the languages of the intended audience.


Other stuff to express in the detail:
What's the difference between audience and content declaration, and why use different approaches.
Acknowledge that there's no good solution for the <title> element or other stuff in <head> for documents with multiple primary languages. 


RI


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

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

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

Received on Tuesday, 8 June 2004 14:40:07 UTC