Skip to content

Commit

Permalink
Merge pull request #324 from w3c/lang
Browse files Browse the repository at this point in the history
Added lang member (closes #322)
  • Loading branch information
Marcos Caceres committed Mar 10, 2015
2 parents c8c2209 + cbd8343 commit 777f716
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ <h3>
</p>
<pre class="example highlight json" title="typical manifest">
{
"lang": "en",
"name": "Super Racer 2000",
"short_name": "Racer2K",
"icons": [{
Expand Down Expand Up @@ -750,6 +751,7 @@ <h3>
Content-Type: application/manifest+json

{
"lang": "en",
"name": "Super Racer 2000",
"start_url": "/start.html",
"display": "fullscreen",
Expand Down Expand Up @@ -882,6 +884,10 @@ <h3>
of running the <a>steps for processing the <code>name</code>
member</a> with <var>manifest</var> as the argument.
</li>
<li>Let <var>language</var> of <var>parsed manifest</var> be the
result of running the <a>steps for processing the <code>lang</code>
member</a> with <var>manifest</var> as the argument.
</li>
<li>Let <var>short name</var> of <var>parsed manifest</var> be the
result of running the <a>steps for processing the
<code>short_name</code> member</a> with <var>manifest</var> as the
Expand Down Expand Up @@ -984,6 +990,41 @@ <h2>
Every manifest has an associated <dfn>manifest URL</dfn>, which the
[[!URL]] from which the <a>manifest</a> was fetched.
</p>
<section>
<h3>
<code title="">lang</code> member
</h3>
<p>
The <dfn id="member-lang"><code>lang</code></dfn> member is a
[[!BCP47]] language tag (string) that specifies the primary language
for the values of the manifest's <code>name</code> and
<code>short_name</code> members.
</p>
<p>
The <dfn>steps for processing the <code>lang</code> member</dfn> is
given by the following algorithm. The algorithm takes a
<var>manifest</var> as an argument. This algorithm returns a string
or <code>undefined</code>.
</p>
<ol>
<li>Let <var>value</var> be the result of calling the
<a>[[\GetOwnProperty]]</a> internal method of <var>manifest</var>
with argument "<code>name</code>".
</li>
<li>If <a>Type</a>(<var>value</var>) is not "string":
<ol>
<li>If <a>Type</a>(<var>value</var>) is not "undefined",
optionally <a>issue a developer warning</a> that the type is not
supported.
</li>
<li>Return <code>undefined</code>.
</li>
</ol>
</li>
<li>Otherwise, <a>Trim</a>(<var>value</var>) and return the result.
</li>
</ol>
</section>
<section>
<h3>
<code title="">name</code> member
Expand Down

0 comments on commit 777f716

Please sign in to comment.