1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501
|
<pre>Network Working Group H. Alvestrand
Request for Comments: 1766 UNINETT
Category: Standards Track March 1995
<span class="h1">Tags for the Identification of Languages</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This document describes a language tag for use in cases where it is
desired to indicate the language used in an information object.
It also defines a Content-language: header, for use in the case where
one desires to indicate the language of something that has <a href="./rfc822">RFC-822</a>-
like headers, like MIME body parts or Web documents, and a new
parameter to the Multipart/Alternative type, to aid in the usage of
the Content-Language: header.
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
There are a number of languages spoken by human beings in this world.
A great number of these people would prefer to have information
presented in a language that they understand.
In some contexts, it is possible to have information in more than one
language, or it might be possible to provide tools for assisting in
the understanding of a language (like dictionaries).
A prerequisite for any such function is a means of labelling the
information content with an identifier for the language in which is
is written.
In the tradition of solving only problems that we think we
understand, this document specifies an identifier mechanism, and one
possible use for it.
<span class="grey">Alvestrand [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. The Language tag</span>
The language tag is composed of 1 or more parts: A primary language
tag and a (possibly empty) series of subtags.
The syntax of this tag in <a href="./rfc822">RFC-822</a> EBNF is:
Language-Tag = Primary-tag *( "-" Subtag )
Primary-tag = 1*8ALPHA
Subtag = 1*8ALPHA
Whitespace is not allowed within the tag.
All tags are to be treated as case insensitive; there exist
conventions for capitalization of some of them, but these should not
be taken to carry meaning.
The namespace of language tags is administered by the IANA according
to the rules in <a href="#section-5">section 5</a> of this document.
The following registrations are predefined:
In the primary language tag:
- All 2-letter tags are interpreted according to ISO standard
639, "Code for the representation of names of languages" [ISO
639].
- The value "i" is reserved for IANA-defined registrations
- The value "x" is reserved for private use. Subtags of "x"
will not be registered by the IANA.
- Other values cannot be assigned except by updating this
standard.
The reason for reserving all other tags is to be open towards new
revisions of ISO 639; the use of "i" and "x" is the minimum we can do
here to be able to extend the mechanism to meet our requirements.
In the first subtag:
- All 2-letter codes are interpreted as ISO 3166 alpha-2
country codes denoting the area in which the language is
used.
- Codes of 3 to 8 letters may be registered with the IANA by
anyone who feels a need for it, according to the rules in
<span class="grey">Alvestrand [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
chapter 5 of this document.
The information in the subtag may for instance be:
- Country identification, such as en-US (this usage is
described in ISO 639)
- Dialect or variant information, such as no-nynorsk or en-
cockney
- Languages not listed in ISO 639 that are not variants of
any listed language, which can be registered with the i-
prefix, such as i-cherokee
- Script variations, such as az-arabic and az-cyrillic
In the second and subsequent subtag, any value can be registered.
NOTE: The ISO 639/ISO 3166 convention is that language names are
written in lower case, while country codes are written in upper case.
This convention is recommended, but not enforced; the tags are case
insensitive.
NOTE: ISO 639 defines a registration authority for additions to and
changes in the list of languages in ISO 639. This authority is:
International Information Centre for Terminology (Infoterm)
P.O. Box 130
A-1021 Wien
Austria
Phone: +43 1 26 75 35 Ext. 312
Fax: +43 1 216 32 72
The following codes have been added in 1989 (nothing later): ug
(Uigur), iu (Inuktitut, also called Eskimo), za (Zhuang), he (Hebrew,
replacing iw), yi (Yiddish, replacing ji), and id (Indonesian,
replacing in).
NOTE: The registration agency for ISO 3166 (country codes) is:
ISO 3166 Maintenance Agency Secretariat
c/o DIN Deutches Institut fuer Normung
Burggrafenstrasse 6
Postfach 1107
D-10787 Berlin
Germany
Phone: +49 30 26 01 320
Fax: +49 30 26 01 231
<span class="grey">Alvestrand [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
The country codes AA, QM-QZ, XA-XZ and ZZ are reserved by ISO 3166 as
user-assigned codes.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Meaning of the language tag</span>
The language tag always defines a language as spoken (or written) by
human beings for communication of information to other human beings.
Computer languages are explicitly excluded.
There is no guaranteed relationship between languages whose tags
start out with the same series of subtags; especially, they are NOT
guraranteed to be mutually comprehensible, although this will
sometimes be the case.
Applications should always treat language tags as a single token; the
division into main tag and subtags is an administrative mechanism,
not a navigation aid.
The relationship between the tag and the information it relates to is
defined by the standard describing the context in which it appears.
So, this section can only give possible examples of its usage.
- For a single information object, it should be taken as the
set of languages that is required for a complete
comprehension of the complete object. Example: Simple text.
- For an aggregation of information objects, it should be taken
as the set of languages used inside components of that
aggregation. Examples: Document stores and libraries.
- For information objects whose purpose in life is providing
alternatives, it should be regarded as a hint that the
material inside is provided in several languages, and that
one has to inspect each of the alternatives in order to find
its language or languages. In this case, multiple languages
need not mean that one needs to be multilingual to get
complete understanding of the document. Example: MIME
multipart/alternative.
- It would be possible to define (for instance) an SGML DTD
that defines a <LANG xx> tag for indicating that following or
contained text is written in this language, such that one
could write "<LANG FR>C'est la vie</LANG>"; the Norwegian-
speaking user could then access a French-Norwegian dictionary
to find out what the quote meant.
<span class="grey">Alvestrand [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. The Content-language header</span>
The Language header is intended for use in the case where one desires
to indicate the language(s) of something that has <a href="./rfc822">RFC-822</a>-like
headers, like MIME body parts or Web documents.
The <a href="./rfc822">RFC-822</a> EBNF of the Language header is:
Language-Header = "Content-Language" ":" 1#Language-tag
Note that the Language-Header is allowed to list several languages in
a comma-separated list.
Whitespace is allowed, which means also that one can place
parenthesized comments anywhere in the language sequence.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Examples of Content-language values</span>
NOTE: NONE of the subtags shown in this document have actually been
assigned; they are used for illustration purposes only.
Norwegian official document, with parallel text in both official
versions of Norwegian. (Both versions are readable by all
Norwegians).
Content-Type: multipart/alternative;
differences=content-language
Content-Language: no-nynorsk, no-bokmaal
Voice recording from the London docks
Content-type: audio/basic
Content-Language: en-cockney
Document in Sami, which does not have an ISO 639 code, and is spoken
in several countries, but with about half the speakers in Norway,
with six different, mutually incomprehensible dialects:
Content-type: text/plain; charset=iso-8859-10
Content-Language: i-sami-no (North Sami)
An English-French dictionary
Content-type: application/dictionary
Content-Language: en, fr (This is a dictionary)
An official EC document (in a few of its official languages)
<span class="grey">Alvestrand [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
Content-type: multipart/alternative
Content-Language: en, fr, de, da, el, it
An excerpt from Star Trek
Content-type: video/mpeg
Content-Language: x-klingon
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Use of Content-Language with Multipart/Alternative</span>
When using the Multipart/Alternative body part of MIME, it is
possible to have the body parts giving the same information content
in different languages. In this case, one should put a Content-
Language header on each of the body parts, and a summary Content-
Language header onto the Multipart/Alternative itself.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. The differences parameter to multipart/alternative</span>
As defined in <a href="./rfc1541">RFC 1541</a>, Multipart/Alternative only has one parameter:
boundary.
The common usage of Multipart/Alternative is to have more than one
format of the same message (f.ex. PostScript and ASCII).
The use of language tags to differentiate between different
alternatives will certainly not lead all MIME UAs to present the most
sensible body part as default.
Therefore, a new parameter is defined, to allow the configuration of
MIME readers to handle language differences in a sensible manner.
Name: Differences
Value: One or more of
Content-Type
Content-Language
Further values can be registered with IANA; it must be the name of a
header for which a definition exists in a published RFC. If not
present, Differences=Content-Type is assumed.
The intent is that the MIME reader can look at these headers of the
message component to do an intelligent choice of what to present to
the user, based on knowledge about the user preferences and
capabilities.
(The intent of having registration with IANA of the fields used in
this context is to maintain a list of usages that a mail UA may
expect to see, not to reject usages.)
<span class="grey">Alvestrand [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
(NOTE: The MIME specification <a href="./rfc1521#section-7.2">[RFC 1521], section 7.2</a>, states that
headers not beginning with "Content-" are generally to be ignored in
body parts. People defining a header for use with "differences="
should take note of this.)
The mechanism for deciding which body part to present is outside the
scope of this document.
MIME EXAMPLE:
Content-Type: multipart/alternative; differences=Content-Language;
boundary="limit"
Content-Language: en, fr, de
--limit
Content-Language: fr
Le renard brun et agile saute par dessus le chien paresseux
--limit
Content-Language: de
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-encoding: quoted-printable
Der schnelle braune Fuchs h=FCpft =FCber den faulen Hund
--limit
Content-Language: en
The quick brown fox jumps over the lazy dog
--limit--
When composing a message, the choice of sequence may be somewhat
arbitrary. However, non-MIME mail readers will show the first body
part first, meaning that this should most likely be the language
understood by most of the recipients.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA registration procedure for language tags</span>
Any language tag must start with an existing tag, and extend it.
This registration form should be used by anyone who wants to use a
language tag not defined by ISO or IANA.
<span class="grey">Alvestrand [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
----------------------------------------------------------------------
LANGUAGE TAG REGISTRATION FORM
Name of requester :
E-mail address of requester:
Tag to be registered :
English name of language :
Native name of language (transcribed into ASCII):
Reference to published description of the language (book or article):
----------------------------------------------------------------------
The language form must be sent to <ietf-types@uninett.no> for a 2-
week review period before submitting it to IANA. (This is an open
list. Requests to be added should be sent to <ietf-types-
request@uninett.no>.)
When the two week period has passed, the language tag reviewer, who
is appointed by the IETF Applications Area Director, either forwards
the request to IANA@ISI.EDU, or rejects it because of significant
objections raised on the list.
Decisions made by the reviewer may be appealed to the IESG.
All registered forms are available online in the directory
<a href="ftp://ftp.isi.edu/in-notes/iana/assignments/languages/">ftp://ftp.isi.edu/in-notes/iana/assignments/languages/</a>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
Security issues are not discussed in this memo.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Character set considerations</span>
Codes may always be expressed using the US-ASCII character repertoire
(a-z), which is present in most character sets.
The issue of deciding upon the rendering of a character set based on
the language tag is not addressed in this memo; however, it is
thought impossible to make such a decision correctly for all cases
unless means of switching language in the middle of a text are
defined (for example, a rendering engine that decides font based on
Japanese or Chinese language will fail to work when a mixed
Japanese-Chinese text is encountered)
<span class="grey">Alvestrand [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc1766">RFC 1766</a> Language Tag March 1995</span>
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Acknowledgements</span>
This document has benefited from innumberable rounds of review and
comments in various fora of the IETF and the Internet working groups.
As so, any list of contributors is bound to be incomplete; please
regard the following as only a selection from the group of people who
have contributed to make this document what it is today.
In alphabetical order:
Tim Berners-Lee, Nathaniel Borenstein, Jim Conklin, Dave Crocker,
Ned Freed, Tim Goodwin, Olle Jarnefors, John Klensin, Keith Moore,
Masataka Ohta, Keld Jorn Simonsen, Rhys Weatherley, and many, many
others.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Author's Address</span>
Harald Tveit Alvestrand
UNINETT
Pb. 6883 Elgeseter
N-7002 TRONDHEIM
NORWAY
EMail: Harald.T.Alvestrand@uninett.no
Phone: +47 73 59 70 94
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
[ISO 639]
ISO 639:1988 (E/F) - Code for the representation of names of
languages - The International Organization for
Standardization, 1st edition, 1988 17 pages Prepared by
ISO/TC 37 - Terminology (principles and coordination).
[ISO 3166]
ISO 3166:1988 (E/F) - Codes for the representation of names
of countries - The International Organization for
Standardization, 3rd edition, 1988-08-15.
[<a id="ref-RFC 1521">RFC 1521</a>]
Borenstein, N., and N. Freed, "MIME Part One: Mechanisms for
Specifying and Describing the Format of Internet Message
Bodies", <a href="./rfc1521">RFC 1521</a>, Bellcore, Innosoft, September 1993.
[<a id="ref-RFC 1327">RFC 1327</a>]
Kille, S., "Mapping between X.400(1988) / ISO 10021 and <a href="./rfc822">RFC</a>
<a href="./rfc822">822</a>", <a href="./rfc1327">RFC 1327</a>, University College London, May 1992.
Alvestrand [Page 9]
</pre>
|