Web-LangTag/whatare.xml

30 lines
1.7 KiB
XML
Raw Normal View History

2023-06-09 10:02:30 +02:00
<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>
2023-06-11 16:17:27 +02:00
<p>They are specified in <wikipedia name="Internet Engineering Task Force">IETF</wikipedia>
2023-06-09 10:02:30 +02:00
<wikipedia name="Request for Comments">RFC</wikipedia> <em>5646</em> (<a
2023-06-11 16:17:27 +02:00
href="https://www.rfc-editor.org/info/rfc5646">available
2023-06-09 10:02:30 +02:00
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
2023-06-11 16:17:27 +02:00
various <wikipedia name="International Organization for Standardization">ISO</wikipedia> standards such as <wikipedia name="ISO
2023-06-09 10:02:30 +02:00
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
2023-06-11 16:17:27 +02:00
indicate to the <wikipedia name="World Wide Web">Web</wikipedia> server what language the
2023-06-09 10:02:30 +02:00
user prefers, should the Web server have several versions).</p>
2023-06-11 16:17:27 +02:00
</page>