Qortora · Search · Indexed page

www.rfc-editor.orgFetched 2026-09-01T06:50:15Z

RFC 5646 - Tags for Identifying Languages

Tags for Identifying Languages (RFC 5646, )

Open original source · Full cached text

RFC 5646 - Tags for Identifying Languages Light Dark Auto RFC 5646 Best Current Practice Title Tags for Identifying Languages Document Document type RFC - Best Current Practice September 2009 View errata Report errata Obsoletes RFC 4646 Was draft-ietf-ltru-4646bis (ltru WG) Select version 23 RFC 5646 Compare versions RFC 5646 draft-ietf-ltru-4646bis-23 draft-ietf-ltru-4646bis-22 draft-ietf-ltru-4646bis-21 draft-ietf-ltru-4646bis-20 draft-ietf-ltru-4646bis-19 draft-ietf-ltru-4646bis-18 draft-ietf-ltru-4646bis-17 draft-ietf-ltru-4646bis-16 draft-ietf-ltru-4646bis-15 draft-ietf-ltru-4646bis-14 draft-ietf-ltru-4646bis-13 draft-ietf-ltru-4646bis-12 draft-ietf-ltru-4646bis-11 draft-ietf-ltru-4646bis-10 draft-ietf-ltru-4646bis-09 draft-ietf-ltru-4646bis-08 draft-ietf-ltru-4646bis-07 draft-ietf-ltru-4646bis-06 draft-ietf-ltru-4646bis-05 draft-ietf-ltru-4646bis-04 draft-ietf-ltru-4646bis-03 draft-ietf-ltru-4646bis-02 draft-ietf-ltru-4646bis-01 draft-ietf-ltru-4646bis-00 RFC 5646 draft-ietf-ltru-4646bis-23 draft-ietf-ltru-4646bis-22 draft-ietf-ltru-4646bis-21 draft-ietf-ltru-4646bis-20 draft-ietf-ltru-4646bis-19 draft-ietf-ltru-4646bis-18 draft-ietf-ltru-4646bis-17 draft-ietf-ltru-4646bis-16 draft-ietf-ltru-4646bis-15 draft-ietf-ltru-4646bis-14 draft-ietf-ltru-4646bis-13 draft-ietf-ltru-4646bis-12 draft-ietf-ltru-4646bis-11 draft-ietf-ltru-4646bis-10 draft-ietf-ltru-4646bis-09 draft-ietf-ltru-4646bis-08 draft-ietf-ltru-4646bis-07 draft-ietf-ltru-4646bis-06 draft-ietf-ltru-4646bis-05 draft-ietf-ltru-4646bis-04 draft-ietf-ltru-4646bis-03 draft-ietf-ltru-4646bis-02 draft-ietf-ltru-4646bis-01 draft-ietf-ltru-4646bis-00 Side-by-side Inline Authors A. Phillips , M. Davis Email authors RFC stream Other formats txt html bibtex Additional resources Mailing list discussion Report a bug Network Working Group A. Phillips, Ed. Request for Comments: 5646 Lab126 BCP: 47 M. Davis, Ed. Obsoletes: 4646 Google Category: Best Current Practice September 2009 Tags for Identifying Languages Abstract This document describes the structure, content, construction, and semantics of language tags for use in cases where it is desirable to indicate the language used in an information object. It also describes how to register values for use in language tags and the creation of user-defined extensions for private interchange. Status of This Memo This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. Distribution of this memo is unlimited. Copyright Notice Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English. Phillips & Davis Best Current Practice [Page 1] RFC 5646 Language Tags September 2009 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. The Language Tag . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.1. Formatting of Language Tags . . . . . . . . . . . . . 6 2.2. Language Subtag Sources and Interpretation . . . . . . . . 8 2.2.1. Primary Language Subtag . . . . . . . . . . . . . . . . 9 2.2.2. Extended Language Subtags . . . . . . . . . . . . . . 11 2.2.3. Script Subtag . . . . . . . . . . . . . . . . . . . . 12 2.2.4. Region Subtag . . . . . . . . . . . . . . . . . . . . 13 2.2.5. Variant Subtags . . . . . . . . . . . . . . . . . . . 15 2.2.6. Extension Subtags . . . . . . . . . . . . . . . . . . 16 2.2.7. Private Use Subtags . . . . . . . . . . . . . . . . . 18 2.2.8. Grandfathered and Redundant Registrations . . . . . . 18 2.2.9. Classes of Conformance . . . . . . . . . . . . . . . . 19 3. Registry Format and Maintenance . . . . . . . . . . . . . . . 21 3.1. Format of the IANA Language Subtag Registry . . . . . . . 21 3.1.1. File Format . . . . . . . . . . . . . . . . . . . . . 21 3.1.2. Record and Field Definitions . . . . . . . . . . . . . 23 3.1.3. Type Field . . . . . . . . . . . . . . . . . . . . . . 26 3.1.4. Subtag and Tag Fields . . . . . . . . . . . . . . . . 26 3.1.5. Description Field . . . . . . . . . . . . . . . . . . 26 3.1.6. Deprecated Field . . . . . . . . . . . . . . . . . . . 28 3.1.7. Preferred-Value Field . . . . . . . . . . . . . . . . 28 3.1.8. Prefix Field . . . . . . . . . . . . . . . . . . . . . 31 3.1.9. Suppress-Script Field . . . . . . . . . . . . . . . . 32 3.1.10. Macrolanguage Field . . . . . . . . . . . . . . . . . 32 3.1.11. Scope Field . . . . . . . . . . . . . . . . . . . . . 33 3.1.12. Comments Field . . . . . . . . . . . . . . . . . . . . 34 3.2. Language Subtag Reviewer . . . . . . . . . . . . . . . . . 35 3.3. Maintenance of the Registry . . . . . . . . . . . . . . . 35 3.4. Stability of IANA Registry Entries . . . . . . . . . . . . 36 3.5. Registration Procedure for Subtags . . . . . . . . . . . . 41 3.6. Possibilities for Registration . . . . . . . . . . . . . . 46 3.7. Extensions and the Extensions Registry . . . . . . . . . . 49 3.8. Update of the Language Subtag Registry . . . . . . . . . . 52 3.9. Applicability of the Subtag Registry . . . . . . . . . . . 52 4. Formation and Processing of Language Tags . . . . . . . . . . 53 4.1. Choice of Language Tag . . . . . . . . . . . . . . . . . . 53 4.1.1. Tagging Encompassed Languages . . . . . . . . . . . . 58 4.1.2. Using Extended Language Subtags . . . . . . . . . . . 59 4.2. Meaning of the Language Tag . . . . . . . . . . . . . . . 61 4.3. Lists of Languages . . . . . . . . . . . . . . . . . . . . 63 4.4. Length Considerations . . . . . . . . . . . . . . . . . . 63 4.4.1. Working with Limited Buffer Sizes . . . . . . . . . . 64 4.4.2. Truncation of Language Tags . . . . . . . . . . . . . 65 4.5. Canonicalization of Language Tags . . . . . . . . . . . . 66 Phillips & Davis Best Current Practice [Page 2] RFC 5646 Language Tags September 2009 4.6. Considerations for Private Use Subtags . . . . . . . . . . 68 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 69 5.1. Language Subtag Registry . . . . . . . . . . . . . . . . . 69 5.2. Extensions Registry . . . . . . . . . . . . . . . . . . . 71 6. Security Considerations . . . . . . . . . . . . . . . . . . . 71 7. Character Set Considerations . . . . . . . . . . . . . . . . . 72 8. Changes from RFC 4646 . . . . . . . . . . . . . . . . . . . . 73 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 76 9.1. Normative References . . . . . . . . . . . . . . . . . . . 76 9.2. Informative References . . . . . . . . . . . . . . . . . . 78 Appendix A. Examples of Language Tags (Informative) . . . . . . . 80 Appendix B. Examples of Registration Forms . . . . . . . . . . . 82 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 83 1. Introduction Human beings on our planet have, past and present, used a number of languages. There are many reasons why one would want to identify the language used when presenting or requesting information. The language of an information item or a user's language preferences often need to be identified so that appropriate processing can be applied. For example, the user's language preferences in a Web browser can be used to select Web pages appropriately. Language information can also be used to select among tools (such as dictionaries) to assist in the processing or understanding of content in different languages. Knowledge about the particular language used by some piece of information content might be useful or even required by some types of processing, for example, spell-checking, computer- synthesized speech, Braille transcription, or high-quality print renderings. One means of indicating the language used is by labeling the information content with an identifier or "tag". These tags can also be used to specify the user's preferences when selecting information content or to label additional attributes of content and associated resources. Sometimes language tags are used to indicate additional language attributes of content. For example, indicating specific information about the dialect, writing system, or orthography used in a document or resource may enable the user to obtain information in a form that they can understand, or it can be important in processing or rendering the given content into an appropriate form or style. This document specifies a particular identifier mechanism (the language tag) and a registration function for values to be used to Phillips & Davis Best Current Practice [Page 3] RFC 5646 Language Tags September 2009 form tags. It also defines a mechanism for private use values and future extensions. This document replaces [RFC4646] (which obsoleted [RFC3066] which, in turn, replaced [RFC1766]). This document, in combination with [RFC4647], comprises BCP 47. For a list of changes in this document, see Section 8. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 2. The Language Tag Language tags are used to help identify languages, whether spoken, written, signed, or otherwise signaled, for the purpose of communication. This includes constructed and artificial languages but excludes languages not intended primarily for human communication, such as programming languages. 2.1. Syntax A language tag is composed from a sequence of one or more "subtags", each of which refines or narrows the range of language identified by the overall tag. Subtags, in turn, are a sequence of alphanumeric characters (letters and digits), distinguished and separated from other subtags in a tag by a hyphen ("-", [Unicode] U+002D). There are different types of subtag, each of which is distinguished by length, position in the tag, and content: each subtag's type can be recognized solely by these features. This makes it possible to extract and assign some semantic information to the subtags, even if the specific subtag values are not recognized. Thus, a language tag processor need not have a list of valid tags or subtags (that is, a copy of some version of the IANA Language Subtag Registry) in order to perform common searching and matching operations. The only exceptions to this ability to infer meaning from subtag structure are the grandfathered tags listed in the productions 'regular' and 'irregular' below. These tags were registered under [RFC3066] and are a fixed list that can never change. The syntax of the language tag in ABNF [RFC5234] is: Language-Tag = langtag ; normal language tags / privateuse ; private use tag / grandfathered ; grandfathered tags Phillips & Davis Best Current Practice [Page 4] RFC 5646 Language Tags September 2009 langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639…