Skip to content

Commit

Permalink
[e] (0) Clarify how language codes are passed on to other tools.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17977
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7607 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 30, 2012
1 parent fe6d40b commit 6c6a6f1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 46 deletions.
33 changes: 18 additions & 15 deletions complete.html
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 29 December 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -11055,20 +11055,23 @@ <h5 id=the-lang-and-xml:lang-attributes><span class=secno>3.2.3.3 </span>The <co
languages, the language of the node is unknown, and the
corresponding language tag is the empty string.</p>

<p>If the resulting value is not a recognized language tag, then it
must be treated as an unknown language having the given language
tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect
language tags, user agents should pass unknown language tags
through unmodified.</p>

<p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be matched by the selector <code title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are
equally invalid. Similarly, if a Web browser and screen reader
working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that tag after all.</p>
<p>If the resulting value is not a recognized language tag, then it must be treated as an unknown
language having the given language tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect language tags, user agents should
pass unknown language tags through unmodified, and tagged as being BCP 47 language tags, so that
subsequent services do not interpret the data as another type of language description. <a href=#refsBCP47>[BCP47]</a></p>

<p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be
matched by the selector <code title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are equally invalid. Similarly, if
a Web browser and screen reader working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was "xyzzy", even if it knew it was
invalid, just in case the screen reader actually supported a language with that tag after all.
Even if the screen reader supported both BCP 47 and another syntax for encoding language names,
and in that other syntax the string "xyzzy" was a way to denote the Belarusian language, it would
be <em>incorrect</em> for the screen reader to then start treating text as Belarusian, because
"xyzzy" is not how Belarusian is described in BCP 47 codes (BCP 47 uses the code "be" for
Belarusian).</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
Expand Down
33 changes: 18 additions & 15 deletions index
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 29 December 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -11055,20 +11055,23 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre> <!-- DO NOT REWR
languages, the language of the node is unknown, and the
corresponding language tag is the empty string.</p>

<p>If the resulting value is not a recognized language tag, then it
must be treated as an unknown language having the given language
tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect
language tags, user agents should pass unknown language tags
through unmodified.</p>

<p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be matched by the selector <code title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are
equally invalid. Similarly, if a Web browser and screen reader
working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that tag after all.</p>
<p>If the resulting value is not a recognized language tag, then it must be treated as an unknown
language having the given language tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect language tags, user agents should
pass unknown language tags through unmodified, and tagged as being BCP 47 language tags, so that
subsequent services do not interpret the data as another type of language description. <a href=#refsBCP47>[BCP47]</a></p>

<p class=example>Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be
matched by the selector <code title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are equally invalid. Similarly, if
a Web browser and screen reader working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was "xyzzy", even if it knew it was
invalid, just in case the screen reader actually supported a language with that tag after all.
Even if the screen reader supported both BCP 47 and another syntax for encoding language names,
and in that other syntax the string "xyzzy" was a way to denote the Belarusian language, it would
be <em>incorrect</em> for the screen reader to then start treating text as Belarusian, because
"xyzzy" is not how Belarusian is described in BCP 47 codes (BCP 47 uses the code "be" for
Belarusian).</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
Expand Down
34 changes: 18 additions & 16 deletions source
Expand Up @@ -11203,22 +11203,24 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre> <!-- DO NOT REWRAP THIS L
languages, the language of the node is unknown, and the
corresponding language tag is the empty string.</p>

<p>If the resulting value is not a recognized language tag, then it
must be treated as an unknown language having the given language
tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect
language tags, user agents should pass unknown language tags
through unmodified.</p>

<p class="example">Thus, for instance, an element with <code
title="">lang="xyzzy"</code> would be matched by the selector <code
title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are
equally invalid. Similarly, if a Web browser and screen reader
working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was
"xyzzy", even if it knew it was invalid, just in case the screen
reader actually supported a language with that tag after all.</p>
<p>If the resulting value is not a recognized language tag, then it must be treated as an unknown
language having the given language tag, distinct from all other languages. For the purposes of
round-tripping or communicating with other services that expect language tags, user agents should
pass unknown language tags through unmodified, and tagged as being BCP 47 language tags, so that
subsequent services do not interpret the data as another type of language description. <a
href="#refsBCP47">[BCP47]</a></p>

<p class="example">Thus, for instance, an element with <code title="">lang="xyzzy"</code> would be
matched by the selector <code title="">:lang(xyzzy)</code> (e.g. in CSS), but it would not be
matched by <code title="">:lang(abcde)</code>, even though both are equally invalid. Similarly, if
a Web browser and screen reader working in unison communicated about the language of the element,
the browser would tell the screen reader that the language was "xyzzy", even if it knew it was
invalid, just in case the screen reader actually supported a language with that tag after all.
Even if the screen reader supported both BCP 47 and another syntax for encoding language names,
and in that other syntax the string "xyzzy" was a way to denote the Belarusian language, it would
be <em>incorrect</em> for the screen reader to then start treating text as Belarusian, because
"xyzzy" is not how Belarusian is described in BCP 47 codes (BCP 47 uses the code "be" for
Belarusian).</p>

<p>If the resulting value is the empty string, then it must be
interpreted as meaning that the language of the node is explicitly
Expand Down

0 comments on commit 6c6a6f1

Please sign in to comment.