<?xml version="1.0" encoding="utf-8"?><!DOCTYPE spec SYSTEM "../../xmlspec/002/xmlspec-i18n.dtd" [<!ENTITY DD "12"><!ENTITY Latestltli "http://www.w3.org/TR/ltli"><!ENTITY MM "June"><!ENTITY ltli "http://www.w3.org/International/core/langtags/"><!ENTITY status "W3C Working Draft"><!ENTITY year "2006">]><spec w3c-doctype="wd" id="ltli" xml:lang="en-US" >  <header>    <title>Language Tags and Locale Identifiers for the World Wide Web</title>    <w3c-designation>langtags</w3c-designation>    <w3c-doctype>&status;</w3c-doctype>    <pubdate><day>&DD;</day><month>&MM;</month><year>&year;</year></pubdate>    <publoc><loc href="http://www.w3.org/TR/2006/WD-ltli-20060612/">http://www.w3.org/TR/2006/WD-ltli-20060612/</loc></publoc>    <altlocs><loc href="ltli.xml">XML</loc></altlocs><latestloc><loc href="http://www.w3.org/TR/ltli/">http://www.w3.org/TR/ltli/</loc></latestloc>    <prevlocs><loc href="http://www.w3.org/TR/2006/WD-ltli-20060419/">http://www.w3.org/TR/2006/WD-ltli-20060419/</loc></prevlocs>    <authlist><author>        <name>Felix Sasaki</name>        <affiliation>W3C</affiliation>      </author>          </authlist>    <abstract><p>Based on <bibref ref="rfc3066bis"/> and <bibref ref="rfc3066bis-matching"/>, this document  describes mechanisms for identifying or selecting the language of  content or locale preferences used to process information using Web  technologies. It  describes how document formats, specifications, and implementations  should handle language tags, as well as data  structures that extend these tags to describe international preferences.</p></abstract>    <status><p><emph>This section describes the status of this document at the time        of its publication. Other documents may supersede this document.        A list of current W3C publications and the latest revision of        this technical report can be found in the <loc href="http://www.w3.org/TR/">W3C technical reports index</loc> at http://www.w3.org/TR/.</emph></p><p>This is an updated Public Working Draft of "Language and Locale Identifiers for the World Wide Web (LTLI)".</p><p>This document  describes mechanisms for identifying or selecting the language of  content or locale preferences used to process information using Web  technologies. It  describes how document formats, specifications, and implementations  should handle language tags, as well as data  structures that extend these tags to describe international preferences.</p><p>This document was developed by the<loc href="http://www.w3.org/International/core/">Internationalization Core Working Group</loc>, part of the <loc href="http://www.w3.org/International/Activity">W3C Internationalization Activity</loc>. The Working Group expects to advance this Working Draft to Recommendation Status. A <loc href="#revisionlog">complete list of changes</loc> to this document is available.</p><p>Send your comments to <loc href="mailto:www-i18n-comments@w3.org?subject=[Comments on ltli WD]">www-i18n-comments@w3.org</loc>. Use "[Comments on ltli WD]" in the subject line of your email, followed by a brief subject. The <loc href="http://lists.w3.org/Archives/Public/www-i18n-comments/">archives</loc> for this list are publicly available.</p><p>Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>         <p> This document was produced by a group operating under the <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</loc>. W3C maintains a <loc href="http://www.w3.org/2004/01/pp-impl/32113/status">public list of any patent disclosures</loc> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</loc> must disclose the information in accordance with <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</loc>. </p></status>    <langusage><language id="en">en</language></langusage><revisiondesc><p>This is the first version of this document.</p></revisiondesc></header><body><div1 id="sec-introduction"><head>Introduction</head><p><emph>This section is informative.</emph></p><div2 id="sec-scope">	<head>Scope of this Specification</head><p>This document  describes mechanisms for identifying or selecting the language of  content or locale preferences used to process information using Web  technologies. It  describes how document formats, specifications, and implementations  should handle the language tags described by <bibref ref="bcp47"/>, as well as data  structures that extend these tags to describe international preferences  (see  <loc href="http://www.w3.org/TR/2004/NOTE-ws-i18n-scenarios-20040730/#IDARXSO">sec. 3.1</loc> in <bibref ref="ws-i18n-scenarios"/>).</p><p>Identification of language and locale has a broad range of applications within the World Wide Web. Existing standards which make use of language identification includes the <code>xml:lang</code> attribute in  <bibref ref="xml10"/>, the <code>lang</code> and <code>hreflang</code> atttributes in <bibref ref="html401"/>, or the <code>language</code> property in  <bibref ref="xsl10"/>. Locale identification is used for example within the CLDR project, cf. <bibref ref="ldml"/>.</p><p>The current best practice when developing specifications for languageidentification is to refer to <bibref ref="rfc3066"/>, using a formulation like <quote>RFC 3066 or its successor</quote>. Recently a successor for <bibref ref="rfc3066"/> has been developed,called <bibref ref="rfc3066bis"/>. This specification takes <bibref ref="rfc3066bis"/> as the basisfor language identification, and <bibref ref="rfc3066bis-matching"/> as the basis formatching of language identifiers ("tags").</p><p>The current practice in many standards  is to identify language in terms of <bibref ref="rfc3066"/>, using formulations like <quote>RFC 3066 or its successor</quote>. Recently a successor for <bibref ref="rfc3066"/> has been developed, called <bibref ref="rfc3066bis"/>. This specification takes <bibref ref="rfc3066bis"/> as the basis for language identification, and <bibref ref="rfc3066bis-matching"/> as the basis for matching of language tags.</p><p><bibref ref="rfc3066bis"/> refers to language identification <emph>only</emph>. Locales can be identified in several ways. One method is by inference fromlanguage tags. For example, an implementation could map a language tagfrom an existing protocol, such as HTTP's Accept-Language header, to itslocale model. Locales may also be identified directly by using the languagetag syntax in data items (elements, attributes, headers, etc.) thatexplicitly serve the purpose of locale identification.</p><p>Currently, this specification refers to <bibref ref="rfc3066bis"/> and <bibref ref="rfc3066bis-matching"/> directly. Since <bibref ref="rfc3066bis"/> and <bibref ref="rfc3066bis-matching"/> are expected to become the new BCP 47 before this working draft becomes a recommendation, a later draft of this specification will refer to BCP 47 directly.</p></div2><div2 id="out-of-scope">	<head>Out of Scope</head><p>This specification will not deal with formats for locale data or actual locale data. One possible source of locale data and data formats is <bibref ref="ldml"/>.</p></div2><div2 id="sec-app-scenarios">	<head>Application Scenario: Web Services Internationalization</head><p>In order to enable multi-locale operation of Web services and to create the ability for locale negotiation, this specification describes a standardized method for identifying locales and locale and/or language tags on the Web, including non-normative guidelines for implementation. This is called out in Requirement <loc href="http://www.w3.org/TR/ws-i18n-req/#R005">R005</loc> of <bibref ref="ws-i18n-req"/>. The mechanism for language and locale identification which is defined in this specification will be used in a future version of the description of Web services Internationalization in <bibref ref="ws-i18n"/>.</p><p>Further application scenarios of this specification encompass for example the standards mentioned in <specref ref="sec-scope"/>. The scenarios can be divided in four areas:</p><ulist><item><p>Definition of values for language tags</p></item><item><p>Definition of values for locale identifiers</p></item><item><p>Definition of matching schemes for language tags</p></item><item><p>Definition of matching schemes for locale identifiers</p></item></ulist><p>As for matching of language tags, many specifications already define operations using matching. An example is the language pseudo-class <code>:lang</code> defined in <loc href="http://www.w3.org/TR/2005/WD-CSS21-20050613/selector.html#lang">sec. 5.11.4</loc> of <bibref ref="css21"/>. It matches elements based on their language. This specification formulates requirements on such operations, based on <bibref ref="rfc3066bis-matching"/>.</p></div2><div2><head>Locale versus Natural Language</head><p>This document defines locale identifiers for use in Web technologies. Historically, natural language identifiers <bibref ref="rfc3066bis"/> have been used as locale identifiers by some programming languages or operating environments, which is natural since locale identifiers usually share certain core features related tonatural language and country/region. This specification defines localeidentifiers that specific locale implementations can map to theirproprietary features in order to create functional, interoperableapplications.</p><p>The minimal requirement is the ability to specify the natural language; thus there is industry convergence on the use of <bibref ref="rfc3066bis"/> as the core of a locale identifier. For example, <bibref ref="cldr"/> uses  <bibref ref="rfc3066bis"/> as the core of a locale identifier, and provides syntax for extensions for non-linguistic information, such as preferred currency or timezone.</p><p>A major difference between language tags and locale identifiers is the meaning of the region code. In both language tags and locales, the region code indicates variation in language (as with regional dialects) or presentation and format (such as number or date formats). In a locale, the region code is also sometimes used to indicate the physical location, market, legal, or other governing policies for the user. </p><p>The language tag may be available in several places. In HTTP, there is an Accept-Language header field which can be used. MIME has a Content-Language header which contains a language tag. In XML, there is an attribute which can be defined for elements called <code>xml:lang</code>. <code>xml:lang</code> marks all the contents and attribute values of the corresponding element as belonging to the language identified. What that means for processing those contents varies from application to application. </p><p>For more detailed information on the behavior of <code>xml:lang</code>, see <bibref ref="xml10"/>.</p></div2></div1><div1>	<head>Notation and Terminology</head>	<p><emph>This section is normative.</emph></p>		<div2 id="sec-matching-lang-values"><head>Language Tags and Matching of Language Tags</head><p>This document uses the terms language tag and subtag which are defined in <bibref ref="rfc3066bis"/>.</p><p>In addition, this document uses the following terms, which are defined in <bibref ref="rfc3066bis-matching"/>:</p><ulist><item><p>language range</p></item><item><p>basic language range (see sec. 2.1 of <bibref ref="rfc3066bis-matching"/>)</p></item><item><p>extended language range (see sec. 2.2 of <bibref ref="rfc3066bis-matching"/>)</p></item><item><p>language priority list (see sec. 2.3 of <bibref ref="rfc3066bis-matching"/>)</p></item></ulist><example><head>Basic versus extended language range and language priority list</head><p><code>de-de</code> is a basic language range. It matches e.g. the language tag <code>de-DE-1996</code>, but not the language tag <code>de-Deva</code>.</p><p><code>de-*-DE</code> is an extended language range. It matches  all of the   following tags:</p><ulist><item><p><code>de-DE</code></p></item><item><p><code>de-DE-x-goethe</code></p></item><item><p><code>de-Latn-DE-1996</code></p></item></ulist><p><code>"en; fr; zh-Hant"</code> is a language priority list. It would be read as <quote>English before French before Chinese as   written in the Traditional script</quote>. Note that the syntax shown is only an example, since it depends on the protocol, application, or   implementation that uses the list.</p></example></div2></div1>			<div1 id="sec-conformance"><head>Conformance</head><p><emph>This section is normative</emph></p><p>This section explains the conditions that specifications have to fulfill to be able to claim conformance to this specification.</p><p id="rfc-2219-def">The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <bibref ref="RFC2119"/>.</p></div1><div1 id="sec-locale-vs-language"><head>Language Tags and Locale Values</head><p><emph>This section is normative</emph></p><p>The following requirements are formulated for specifications who deal with language tags and locale values or matching schemes.</p><olist><item id="ltli-c1"><p>Specifications that make use of language tags or locale values <rfc2119>MUST</rfc2119> meet the conformance criteria defined for "well-formed" processors, as defined in sec. 2.2.9 of <bibref ref="rfc3066bis"/>.</p></item><item id="ltli-c2"><p>Specifications that make use of language tags or locale values <rfc2119>MAY</rfc2119> validate these values. If they do so, they <rfc2119>MUST</rfc2119> meet the conformance criteria defined for "validating" processors, as defined in sec. 2.2.9 of <bibref ref="rfc3066bis"/>.</p></item><item id="ltli-c3"><p>Specifications that define operations on language tags or locale values using matching <rfc2119>Must</rfc2119> use either a basic language range or an extended language range.</p></item><item id="ltli-c4"><p>Specifications that define operations on language tags or locale values using matching <rfc2119>MUST</rfc2119> specify whether the resulting language priority list contains a single result (<emph>lookup</emph> as defined in  <bibref ref="rfc3066bis-matching"/>), or a possible empty set of results (<emph>filtering</emph> as defined in <bibref ref="rfc3066bis-matching"/>).</p></item></olist><note><p>Many specifications which have been created before <bibref ref="rfc3066bis"/> and <bibref ref="rfc3066bis-matching"/> are conformant to these criteria. The purpose of the criteria is to provide a stable source for requirements for language and locale identification.</p></note></div1><div1>	<head>Guidelines for the Interoperable Implementation of this Specification</head>	<p><emph>This section is informative.</emph></p>	<p><ednote><edtext>This section will be written in a subsequent working draft.</edtext></ednote></p></div1></body><back><div1><head>Normative References</head><blist>    <bibl key="BCP 47" id="bcp47"><loc href="ftp://ftp.rfc-editor.org/in-notes/bcp/bcp47.txt">Tags for the Identification of Languages</loc>. IETF Best Common Practice. BCP 47 is currently represented by <bibref ref="rfc3066"/>.</bibl><bibl id="RFC2119" key="RFC 2119">S. Bradner. <loc href="http://www.ietf.org/rfc/rfc2119.txt">Key Words for use in RFCs to Indicate Requirement Levels</loc>. IETF March 1997. Available at  <loc href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</loc>.</bibl><bibl id="rfc3066bis" key="RFC 3066bis">Addison Phillips, Mark Davis. <titleref href="http://www.ietf.org/internet-drafts/draft-ietf-ltru-registry-14.txt">Tags for the Identification of Languages</titleref>. IETF Internet-Draft, 14 October 2005. See <loc href="http://www.ietf.org/internet-drafts/draft-ietf-ltru-registry-14.txt">http://www.ietf.org/internet-drafts/draft-ietf-ltru-registry-14.txt</loc>.</bibl><bibl id="rfc3066bis-matching" key="RFC 3066bis Matching">Addison Phillips, Mark Davis <titleref href="http://www.ietf.org/internet-drafts/draft-ietf-ltru-matching-14.txt">Matching of Language Tags</titleref>. IETF Internet-Draft, June 2006. See <loc href="http://www.ietf.org/internet-drafts/draft-ietf-ltru-matching-14.txt">http://www.ietf.org/internet-drafts/draft-ietf-ltru-matching-14.txt</loc>.</bibl><bibl key="RFC 3987" id="iri">Martin Dürst, Michael Suignard. <titleref href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</titleref>. IETF January 2005. Available at <loc href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</loc>.</bibl></blist></div1><inform-div1><head>References</head><blist><bibl id="cldr" key="CLDR"><titleref href="http://unicode.org/cldr/">Common Locale Data Registry (CLDR)</titleref>. Available at http://unicode.org/cldr/.</bibl><bibl key="CSS 2.1" id="css21">Bert Bos, Tantek Çelik, Ian Hickson, Håkon Wium Lie. <titleref href="http://www.w3.org/TR/2005/WD-CSS21-20050613/">Cascading Style Sheets, level 2 revision 1</titleref>. W3C Working Draft 13 June 2005. Available at <loc href="http://www.w3.org/TR/2005/WD-CSS21-20050613/">http://www.w3.org/TR/2005/WD-CSS21-20050613/</loc>. The latest version of <loc href="http://www.w3.org/TR/CSS21/">CSS 2.1</loc> is available at http://www.w3.org/TR/CSS21/.</bibl><bibl key="HTML 4.01" id="html401">Dave Ragget, Arnaud Le Hors, Ian Jacobs, eds. <titleref href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01 Specification</titleref>. W3C Recommendation 24 December 1999. Available at <loc href="http://www.w3.org/TR/1999/REC-html401-19991224/">http://www.w3.org/TR/1999/REC-html401-19991224/</loc>. The latest version of <loc href="http://www.w3.org/TR/html401/">HTML 4.01</loc> is available at http://www.w3.org/TR/html401/.</bibl><bibl id="ldml" key="LDML">Mark Davis.  <titleref href="http://unicode.org/reports/tr35/tr35-5.html">Locale Data Markup Language (LDML)</titleref>, Unicode Technical Standard #35.Available at <loc href="http://unicode.org/reports/tr35/tr35-5.html">http://unicode.org/reports/tr35/tr35-5.html</loc>. The latest version of <loc href="http://unicode.org/reports/tr35/">LDML</loc> is available at http://unicode.org/reports/tr35/.  </bibl>    <bibl id="rfc3066" key="RFC 3066">H. Alvestrand, editor. <titleref href="http://www.ietf.org/rfc/rfc3066.txt"> Tags for the Identification of Languages</titleref>, IETF January 2001. Available at <loc href="http://www.ietf.org/rfc/rfc3066.txt">http://www.ietf.org/rfc/rfc3066.txt</loc>.  </bibl><bibl key="WS-I18N" id="ws-i18n">    Addison Phillips, Mary Trumble. <titleref href="http://www.w3.org/TR/2005/WD-ws-i18n-20050914/">Web Services Internationalization (WS-I18N)</titleref>. W3C Working Draft 14 September 2005. Available at <loc href="http://www.w3.org/TR/2005/WD-ws-i18n-20050914/">http://www.w3.org/TR/2005/WD-ws-i18n-20050914/</loc>. The latest version of <loc href="http://www.w3.org/TR/ws-i18n/">WS i18n</loc> is available at http://www.w3.org/TR/ws-i18n/.</bibl><bibl key="WS-I18N Req" id="ws-i18n-req">Addison Phillips. <titleref href="http://www.w3.org/TR/2004/NOTE-ws-i18n-req-20041116/">Requirements for the Internationalization of Web Services</titleref>. W3C Working Group Note 16 November 2004. Available at <loc href="http://www.w3.org/TR/2004/NOTE-ws-i18n-req-20041116/">http://www.w3.org/TR/2004/NOTE-ws-i18n-req-20041116/</loc>. The latest version of <loc href="http://www.w3.org/TR/ws-i18n-req/">Ws i18n Req</loc> is available at http://www.w3.org/TR/ws-i18n-req/.</bibl><bibl id="ws-i18n-scenarios" key="WS-I18N Scenarios">Debasish Banerjee, Martin Dürst, Mike McKenna, Addison Phillips, Takao Suzuki, Tex Texin, Mary Trumble, Andrea Vine, Kentaro Noji. <titleref href="http://www.w3.org/TR/2004/NOTE-ws-i18n-scenarios-20040730/">Web Services Internationalization Usage Scenarios</titleref>. W3C Working Group Note 30 July 2004. Available at <loc href="http://www.w3.org/TR/2004/NOTE-ws-i18n-scenarios-20040730/">http://www.w3.org/TR/2004/NOTE-ws-i18n-scenarios-20040730/</loc>. The latest version of <loc href="http://www.w3.org/TR/ws-i18n-scenarios/">WS i18n Scenarios</loc> is available at http://www.w3.org/TR/ws-i18n-scenarios/.</bibl><bibl id="xml10" key="XML 1.0">Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, et al., eds. <titleref href="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup Language (XML) 1.0 (Third Edition)</titleref>, W3C Recommendation 04 February 2004. Available at <xspecref href="http://www.w3.org/TR/2004/REC-xml-20040204/">http://www.w3.org/TR/2004/REC-xml-20040204/</xspecref>. The latest version of <xspecref href="http://www.w3.org/TR/REC-xml/">XML 1.0</xspecref> is available at http://www.w3.org/TR/REC-xml/.  </bibl><bibl id="xsl10" key="XSL 1.0">Sharon Adler et al., eds. <titleref href="http://www.w3.org/TR/2001/REC-xsl-20011015/">Extensible Stylesheet Language (XSL) Version 1.0</titleref>. W3C Recommendation 15 October 2001. Available at <loc href="http://www.w3.org/TR/2001/REC-xsl-20011015/">http://www.w3.org/TR/2001/REC-xsl-20011015/</loc>. The latest version of <loc href="http://www.w3.org/TR/xsl/">XSL 1.0</loc> is available at http://www.w3.org/TR/xsl/.</bibl></blist></inform-div1><inform-div1 id="revisionlog"><head>Revision Log</head><p>The following log records changes that have been made to this document since the <loc href="http://www.w3.org/TR/2006/WD-ltli-20060419/">publication in April 2006</loc>.</p><ulist><item><p>The informative <loc href="#sec-introduction">introductory section</loc> has been rewritten thoroughly, including the description of the <loc href="#sec-scope">scope of the document</loc>, of <loc href="#sec-app-scenarios">application scenarios</loc> and of the separation <loc href="#sec-locale-vs-language">locale versus natural language</loc>.</p></item><item><p>Terms which rely on <bibref ref="rfc3066bis"/> and <bibref ref="rfc3066bis-matching"/> are not <emph>defined</emph> anymore, but only <emph>reference</emph>  these documents, see <specref ref="sec-matching-lang-values"/>. In addition, examples for these terms have been created.</p></item><item><p>The requirements for language and locale values have been taken out of the <loc href="#sec-conformance">conformance section</loc> and are now placed in the separate <specref ref="sec-locale-vs-language"/>.</p></item><item><p>A revision log has been created.</p></item></ulist></inform-div1></back></spec>