Web-LangTag/whatare.xml

30 lines
1.7 KiB
XML

<page title="What are they?">
<p><em>Language tags</em> are a way to <em>tag</em> digital resources
to indicate in what <wikipedia name="language">human
language</wikipedia> they are. They are also used by software to tell
an user's preference about languages.</p>
<p>They can express the language itself but also the writing system,
the national variant and many other things.</p>
<p>A few examples of language tags:</p>
<ul>
<li><code>fr</code>: <wikipedia name="French language">French</wikipedia> language,</li>
<li><code>en-AU</code>: <wikipedia name="English language">English</wikipedia> language, as
written and spoken in <wikipedia>Australia</wikipedia>,</li>
<li><code>az-Latn-IR</code>, <wikipedia name="Azerbaijani language">Azeri</wikipedia> language,
written in the <wikipedia name="Latin alphabet">Latin</wikipedia> script, as used in <wikipedia>Iran</wikipedia>.</li>
</ul>
<p>They are specified in <wikipedia name="Internet Engineering Task Force">IETF</wikipedia>
<wikipedia name="Request for Comments">RFC</wikipedia> <em>5646</em> (<a
href="https://www.rfc-editor.org/info/rfc5646">available
online</a>).</p>
<p>Language tags are made of <em>subtags</em> separated by
hyphens. The list of possible subtags is mostly directly copied from
various <wikipedia name="International Organization for Standardization">ISO</wikipedia> standards such as <wikipedia name="ISO
639">ISO 639</wikipedia>.</p>
<p>They are used in many formats and protocols for instance in
<wikipedia>XML</wikipedia> (through the <code>xml:lang</code>
attribute) and in <wikipedia>HTTP</wikipedia> (the browser can
indicate to the <wikipedia name="World Wide Web">Web</wikipedia> server what language the
user prefers, should the Web server have several versions).</p>
</page>