W3C home > Mailing lists > Public > www-international@w3.org > July to September 2011

Re: For review: 1 new and 3 updated articles about language declarations in HTML

From: Richard Ishida <ishida@w3.org>
Date: Fri, 02 Sep 2011 11:23:07 +0100
Message-ID: <4E60AE8B.7020509@w3.org>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
CC: www International <www-international@w3.org>
On 23/08/2011 01:16, Leif Halvard Silli wrote:
> Richard Ishida, Thu, 18 Aug 2011 16:47:20 +0100:
>> 3    Declaring language in HTML
> http://www.w3.org/International/tutorials/new-language-decl/qa-html-language-declarations
>>      This is a new article derived from information that was
>> originally in the tutorial mentioned above. The information has been
>> rewritten, and changes have been made to reflect recent developments
>> for HTML5.
> Comments:
>     ]] If you are serving your page as XML (ie. using a MIME type such
> as application/xhtml+xml), you do not need the lang attribute. The
> xml:lang attribute alone will suffice. (The lang is allowed, but it
> won't have any effect.) [[
> * The paragraph above does not match reality: @lang *does* have effect
> - at least for CSS selectors, and at least in in Firefox, Opera,
> Chrome, Webkit and IE9 - even if the page is served as XML. In fact,
> David Carlisle in the discussion field of a bug against Polyglot Markup
> questioned whether xml:lang was needed, but we did not push it.
> * The advantage, thus, of using xml:lang is - I think - that it is a
> *generic* XML feature. Thus, xml:lang makes sure language declaring
> works even in the most generic XML parser. However, for the most
> advanced XML parsers, those who implement HTMl5 as well, they do
> attribute meaning to the @lang attribute.

Good points. I was a little sloppy there. I removed "(The lang is 
allowed, but it won't have any effect.)" and added the following to the 
previous paragraph:

"The lang is allowed by the syntax of XHTML, and may also be recognized 
by browsers. When using other XML parsers, however (such as the lang() 
function in XSLT) you can't rely on the lang attribute being recognized."

>    ]] Specifying metadata about the audience language [[
> * It really would have helped if you had moved that section to another
> document - namely to that document dealing with HTTP Content-Langauge.
> It should be minimized more. And the link to the 'HTTP and meta for
> language information' article, should be moved from bottom to top of
> this section ...

Actually I did move the majority of the text that was here to the 'HTTP 
and meta for language information' article, but then came back here to 
add just a skeletal overview for those who don't bother to follow the 
link.  I'd prefer to leave this level of detail for now, given that this 
change is a big deal.


Richard Ishida
Internationalization Activity Lead
W3C (World Wide Web Consortium)


Register for the W3C MultilingualWeb Workshop!
Limerick, 21-22 September 2011
Received on Friday, 2 September 2011 10:23:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:32 UTC