ISSUE-31: What's the language of a document

What's the language of a document

State:
CLOSED
Product:
html
Raised by:
Richard Ishida
Opened on:
2011-06-20
Description:
4.2.5.3 Pragma directives
http://dev.w3.org/html5/spec/semantics.html#attr-meta-http-equiv-content-language

WG Approved: Yes



Our proposal is as follows and is based on the text of the following sections:

http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#document-wide-default-language

http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-lang-and-xml:lang-attributes

[1] Explain clearly that declarations in the http header and the meta element refer to the document as an object, rather than the text in a specific element (this is what makes the distinction between single and multiple values sensible).

[2] Continue to recommend that the document-wide default language be defined by a lang attribute on the html tag, but say that if the lang attribute is missing and there is a language defined in the http or meta, then those language declarations can be used to guess the language of the text, if they contain a single value.

[3] Establish the precedence between http vs meta.

[4] Establish the rule that multiple values in the place that has precedence equates to lang="".

This is very close to what we already have, but doesn't try to make the meta declaration a different thing than the http declaration, or change it so that multiple values are no longer valid. At the same time, it allows either the http or the meta to provide language information for text-processing, if the declaration is useable.

We also feel that the spec seems to restrict the use of the term 'document-wide default language' to refer only to a language declared using the meta, and this is rather odd. We feel that in fact the lang attribute on the html element also establishes a document-wide default language. (See the text: "Until the pragma is successfully processed, there is no document-wide default language.")

Update: This comment became part of ISSUE-88.


IMPORTANT: This issue was moved from our old review tracking system to the new tracker system. For previous mail relating to this issue, see: http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=the%20language%20of%20a%20document&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&index-grp=Member__FULL+Public__FULL&index-type=t&type-index=www-international%40w3.org&resultsperpage=20&sortby=date

Related Actions Items:
No related actions
Related emails:
  1. Review of tracker issues for best practices (from addison@lab126.com on 2015-03-25)

Related notes:

Issue-88 was resolved such that the meta Content-Language tag was declared non-compliant in HTML5.

The mechanism for selecting a default language for the page from the meta element or HTTP Content-Language field, if they exist, remains.

Richard Ishida, 20 Jun 2011, 15:17:13

Display change log ATOM feed


Addison Phillips <addison@amazon.com>, Chair, Richard Ishida <ishida@w3.org>, Fuqiao Xue <xfq@w3.org>, Atsushi Shimono <atsushi@w3.org>, Staff Contacts
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.326 2018/10/13 17:29:51 vivien Exp $