home *** CD-ROM | disk | FTP | other *** search
/ Handbook of Infosec Terms 2.0 / Handbook_of_Infosec_Terms_Version_2.0_ISSO.iso / text / rfcs / rfc1766.txt < prev    next >
Text File  |  1996-05-07  |  17KB  |  309 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                      H. Alvestrand Request for Comments: 1766                                       UNINETT Category: Standards Track                                     March 1995 
  8.  
  9.                  Tags for the Identification of Languages 
  10.  
  11. Status of this Memo 
  12.  
  13.    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. 
  14.  
  15. Abstract 
  16.  
  17.    This document describes a language tag for use in cases where it is    desired to indicate the language used in an information object. 
  18.  
  19.    It also defines a Content-language: header, for use in the case where    one desires to indicate the language of something that has RFC-822-    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. 
  20.  
  21. 1.  Introduction 
  22.  
  23.    There are a number of languages spoken by human beings in this world. 
  24.  
  25.    A great number of these people would prefer to have information    presented in a language that they understand. 
  26.  
  27.    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). 
  28.  
  29.    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. 
  30.  
  31.    In the tradition of solving only problems that we think we    understand, this document specifies an identifier mechanism, and one    possible use for it. 
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. Alvestrand                                                      [Page 1] 
  40.  RFC 1766                      Language Tag                    March 1995 
  41.  
  42.  2.  The Language tag 
  43.  
  44.    The language tag is composed of 1 or more parts: A primary language    tag and a (possibly empty) series of subtags. 
  45.  
  46.    The syntax of this tag in RFC-822 EBNF is: 
  47.  
  48.     Language-Tag = Primary-tag *( "-" Subtag )     Primary-tag = 1*8ALPHA     Subtag = 1*8ALPHA 
  49.  
  50.    Whitespace is not allowed within the tag. 
  51.  
  52.    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. 
  53.  
  54.    The namespace of language tags is administered by the IANA according    to the rules in section 5 of this document. 
  55.  
  56.    The following registrations are predefined: 
  57.  
  58.    In the primary language tag: 
  59.  
  60.     -    All 2-letter tags are interpreted according to ISO standard          639, "Code for the representation of names of languages" [ISO          639]. 
  61.  
  62.     -    The value "i" is reserved for IANA-defined registrations 
  63.  
  64.     -    The value "x" is reserved for private use. Subtags of "x"          will not be registered by the IANA. 
  65.  
  66.     -    Other values cannot be assigned except by updating this          standard. 
  67.  
  68.    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. 
  69.  
  70.    In the first subtag: 
  71.  
  72.     -    All 2-letter codes are interpreted as ISO 3166 alpha-2          country codes denoting the area in which the language is          used. 
  73.  
  74.     -    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 
  75.  
  76.  
  77.  
  78. Alvestrand                                                      [Page 2] 
  79.  RFC 1766                      Language Tag                    March 1995 
  80.  
  81.           chapter 5 of this document. 
  82.  
  83.    The information in the subtag may for instance be: 
  84.  
  85.     -    Country identification, such as en-US (this usage is          described in ISO 639) 
  86.  
  87.     -    Dialect or variant information, such as no-nynorsk or en-          cockney 
  88.  
  89.     -    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 
  90.  
  91.     -    Script variations, such as az-arabic and az-cyrillic 
  92.  
  93.    In the second and subsequent subtag, any value can be registered. 
  94.  
  95.    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. 
  96.  
  97.    NOTE: ISO 639 defines a registration authority for additions to and    changes in the list of languages in ISO 639. This authority is: 
  98.  
  99.          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 
  100.  
  101.    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). 
  102.  
  103.    NOTE: The registration agency for ISO 3166 (country codes) is: 
  104.  
  105.          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 
  106.  
  107.  
  108.  
  109. Alvestrand                                                      [Page 3] 
  110.  RFC 1766                      Language Tag                    March 1995 
  111.  
  112.     The country codes AA, QM-QZ, XA-XZ and ZZ are reserved by ISO 3166 as    user-assigned codes. 
  113.  
  114. 2.1.  Meaning of the language tag 
  115.  
  116.    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. 
  117.  
  118.    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. 
  119.  
  120.    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. 
  121.  
  122.    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. 
  123.  
  124.     -    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. 
  125.  
  126.     -    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. 
  127.  
  128.     -    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. 
  129.  
  130.     -    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. 
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  Alvestrand                                                      [Page 4] 
  137.  RFC 1766                      Language Tag                    March 1995 
  138.  
  139.  3.  The Content-language header 
  140.  
  141.    The Language header is intended for use in the case where one desires    to indicate the language(s) of something that has RFC-822-like    headers, like MIME body parts or Web documents. 
  142.  
  143.    The RFC-822 EBNF of the Language header is: 
  144.  
  145.     Language-Header = "Content-Language" ":" 1#Language-tag 
  146.  
  147.    Note that the Language-Header is allowed to list several languages in    a comma-separated list. 
  148.  
  149.    Whitespace is allowed, which means also that one can place    parenthesized comments anywhere in the language sequence. 
  150.  
  151. 3.1.  Examples of Content-language values 
  152.  
  153.    NOTE: NONE of the subtags shown in this document have actually been    assigned; they are used for illustration purposes only. 
  154.  
  155.    Norwegian official document, with parallel text in both official    versions of Norwegian. (Both versions are readable by all    Norwegians). 
  156.  
  157.       Content-Type: multipart/alternative;              differences=content-language       Content-Language: no-nynorsk, no-bokmaal 
  158.  
  159.    Voice recording from the London docks 
  160.  
  161.       Content-type: audio/basic       Content-Language: en-cockney 
  162.  
  163.    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: 
  164.  
  165.       Content-type: text/plain; charset=iso-8859-10       Content-Language: i-sami-no (North Sami) 
  166.  
  167.    An English-French dictionary 
  168.  
  169.       Content-type: application/dictionary       Content-Language: en, fr (This is a dictionary) 
  170.  
  171.    An official EC document (in a few of its official languages) 
  172.  
  173.  
  174.  
  175.  Alvestrand                                                      [Page 5] 
  176.  RFC 1766                      Language Tag                    March 1995 
  177.  
  178.        Content-type: multipart/alternative       Content-Language: en, fr, de, da, el, it 
  179.  
  180.    An excerpt from Star Trek 
  181.  
  182.       Content-type: video/mpeg       Content-Language: x-klingon 
  183.  
  184. 4.  Use of Content-Language with Multipart/Alternative 
  185.  
  186.    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. 
  187.  
  188. 4.1.  The differences parameter to multipart/alternative 
  189.  
  190.    As defined in RFC 1541, Multipart/Alternative only has one parameter:    boundary. 
  191.  
  192.    The common usage of Multipart/Alternative is to have more than one    format of the same message (f.ex. PostScript and ASCII). 
  193.  
  194.    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. 
  195.  
  196.    Therefore, a new parameter is defined, to allow the configuration of    MIME readers to handle language differences in a sensible manner. 
  197.  
  198.     Name: Differences     Value: One or more of          Content-Type          Content-Language 
  199.  
  200.    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. 
  201.  
  202.    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. 
  203.  
  204.    (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.) 
  205.  
  206.  
  207.  
  208. Alvestrand                                                      [Page 6] 
  209.  RFC 1766                      Language Tag                    March 1995 
  210.  
  211.     (NOTE: The MIME specification [RFC 1521], section 7.2, 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.) 
  212.  
  213.    The mechanism for deciding which body part to present is outside the    scope of this document. 
  214.  
  215.     MIME EXAMPLE: 
  216.  
  217.     Content-Type: multipart/alternative; differences=Content-Language;               boundary="limit"     Content-Language: en, fr, de 
  218.  
  219.     --limit     Content-Language: fr 
  220.  
  221.     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 
  222.  
  223.     Der schnelle braune Fuchs h=FCpft =FCber den faulen Hund     --limit     Content-Language: en 
  224.  
  225.     The quick brown fox jumps over the lazy dog     --limit-- 
  226.  
  227.    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. 
  228.  
  229. 5.  IANA registration procedure for language tags 
  230.  
  231.    Any language tag must start with an existing tag, and extend it. 
  232.  
  233.    This registration form should be used by anyone who wants to use a    language tag not defined by ISO or IANA. 
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  Alvestrand                                                      [Page 7] 
  244.  RFC 1766                      Language Tag                    March 1995 
  245.  
  246.  ---------------------------------------------------------------------- LANGUAGE TAG REGISTRATION FORM 
  247.  
  248. Name of requester          : E-mail address of requester: Tag to be registered       : 
  249.  
  250. English name of language   : 
  251.  
  252. Native name of language (transcribed into ASCII): 
  253.  
  254. Reference to published description of the language (book or article): ---------------------------------------------------------------------- 
  255.  
  256.    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>.) 
  257.  
  258.    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. 
  259.  
  260.    Decisions made by the reviewer may be appealed to the IESG. 
  261.  
  262.    All registered forms are available online in the directory    ftp://ftp.isi.edu/in-notes/iana/assignments/languages/ 
  263.  
  264. 6.  Security Considerations 
  265.  
  266.    Security issues are not discussed in this memo. 
  267.  
  268. 7.  Character set considerations 
  269.  
  270.    Codes may always be expressed using the US-ASCII character repertoire    (a-z), which is present in most character sets. 
  271.  
  272.    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) 
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  Alvestrand                                                      [Page 8] 
  279.  RFC 1766                      Language Tag                    March 1995 
  280.  
  281.  8.  Acknowledgements 
  282.  
  283.    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. 
  284.  
  285.    In alphabetical order: 
  286.  
  287.    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. 
  288.  
  289. 9.  Author's Address 
  290.  
  291.    Harald Tveit Alvestrand    UNINETT    Pb. 6883 Elgeseter    N-7002 TRONDHEIM    NORWAY 
  292.  
  293.    EMail: Harald.T.Alvestrand@uninett.no    Phone: +47 73 59 70 94 
  294.  
  295. 10.  References 
  296.  
  297.     [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). 
  298.  
  299.     [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. 
  300.  
  301.     [RFC 1521]          Borenstein, N., and N. Freed, "MIME Part One: Mechanisms for          Specifying and Describing the Format of Internet Message          Bodies", RFC 1521, Bellcore, Innosoft, September 1993. 
  302.  
  303.     [RFC 1327]          Kille, S., "Mapping between X.400(1988) / ISO 10021 and RFC          822", RFC 1327, University College London, May 1992. 
  304.  
  305.  
  306.  
  307.  Alvestrand                                                      [Page 9] 
  308.  
  309.