LanguageTag

*/-->

div.org-src-container {
font-size: 85%;
font-family: monospace;
}
pre.src {
background-color:#2e3436;
color:#fefffe;
}

p {font-size: 15px}
li {font-size: 15px}

Table of Contents

  • 1. The Language Tag

This is a memo of RFC 5646, ie BCP-47.

1 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.

1.1 Syntax

  • TAG is composed from a sequence of one or more subtags
  • SubTags are sequence of alphanumric characters to narrow the range of languge.
  • SubTags are concated suing "-".

The syntax of the language tag in ABNF [RFC5234] is:

Language-Tag  = langtag             ; normal language tags
              / privateuse          ; private use tag
              / grandfathered       ; grandfathered tags

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 codes
                *2("-" 3ALPHA)      ; permanently reserved

script        = 4ALPHA              ; ISO 15924 code

region        = 2ALPHA              ; ISO 3166-1 code
              / 3DIGIT              ; UN M.49 code

variant       = 5*8alphanum         ; registered variants
              / (DIGIT 3alphanum)

extension     = singleton 1*("-" (2*8alphanum))

                                    ; Single alphanumerics
                                    ; "x" reserved for private use
singleton     = DIGIT               ; 0 - 9
              / %x41-57             ; A - W
              / %x59-5A             ; Y - Z
              / %x61-77             ; a - w
              / %x79-7A             ; y - z

privateuse    = "x" 1*("-" (1*8alphanum))

grandfathered = irregular           ; non-redundant tags registered
              / regular             ; during the RFC 3066 era

irregular     = "en-GB-oed"         ; irregular tags do not match
              / "i-ami"             ; the ‘langtag‘ production and
              / "i-bnn"             ; would not otherwise be
              / "i-default"         ; considered ‘well-formed‘
              / "i-enochian"        ; These tags are all valid,
              / "i-hak"             ; but most are deprecated
              / "i-klingon"         ; in favor of more modern
              / "i-lux"             ; subtags or subtag
              / "i-mingo"           ; combination
              / "i-navajo"
              / "i-pwn"
              / "i-tao"
              / "i-tay"
              / "i-tsu"
              / "sgn-BE-FR"
              / "sgn-BE-NL"
              / "sgn-CH-DE"

regular       = "art-lojban"        ; these tags match the ‘langtag‘
              / "cel-gaulish"       ; production, but their subtags
              / "no-bok"            ; are not extended language
              / "no-nyn"            ; or variant subtags: their meaning
              / "zh-guoyu"          ; is defined by their registration
              / "zh-hakka"          ; and all of these are deprecated
              / "zh-min"            ; in favor of a more modern
              / "zh-min-nan"        ; subtag or sequence of subtags
              / "zh-xiang"

alphanum      = (ALPHA / DIGIT)     ; letters and numbers

Figure 1: Language Tag ABNF

Note:

1.1.1 Formatting of Languge Tags

Although tags should be case-insensitive, there are formatting conventions:

  • recommends that language codes be written in lowercase (‘mn‘ Mongolian).
  • recommends that script codes use lowercase with the initial letter capitalized (‘Cyrl‘ Cyrillic).
  • recommends that country codes be capitalized (‘MN‘ Mongolia).

1.2 Language Subtag Sources and Interpretation

The namespace of language tags and their subtags is administered by
the Internet Assigned Numbers Authority (IANA) according to the rules
in Section 5 of this document. The Language Subtag Registry
maintained by IANA is the source for valid subtags: other standards
referenced in this section provide the source material for that
registry.

1.2.1 Primary Language Subtag

Should never be omitted in most cases, can be two or three characters.


(转载请注明出处
使用许可:署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议 。)

LanguageTag,布布扣,bubuko.com

时间: 2024-12-20 19:10:03

LanguageTag的相关文章

HTTP1.1协议中文版-RFC2616

转自:http://www.cnpaf.net/Class/HTTP/200811/23277.html 说明 本文档规定了互联网社区的标准组协议,并需要讨论和建议以便更加完善.请参考 “互联网官方协议标准”(STD 1)来了解本协议的标准化状态.本协议不限流传发布. 版权声明 Copyright (C) The Internet Society (1999).   All Rights Reserved. 摘要 超文本传输协议(HTTP)是一种为分布式,合作式,超媒体信息系统.它是一种通用的,

Android中的系统服务(代理模式)

一,系统启动 Android设备的开机流程总得来分可以分为三部分: 加载引导程序 引导程序bootloader是开机运行的第一个小程序,因此它是针对特定的主板与芯片的.bootloader有很多种,可以使用比较流行的如redboot.uboot.ARMBoot等,也可以开发自己的引导程序,它不是Android操作系统的一部分.引导程序也是OEM厂商或者运营商加锁和限制的地方. 引导程序初始化硬件设备.创建存储器空间的映射等软件运行时所需要的最小环境:加载Linux内核镜像文件(本文只针对Andr

1.1 Modify Template修改模板

模板是一些XML,PHP,HTML,imag文件的集合,在templates目录下.可以直接修改这些模板文件或者通过后台  扩展->模板管理器管理. (1)Befor You Begin Joomla核心文件的更新可能会包含默认模板的副本,可能会使你的修改丢失.所以为了保留你的更改,需要进行备份. (2)Copy the Template 扩展->模板管理->点击模板列  进入定制模板页面有两种拷贝模板的方式:Easy 点击复制模板按钮->输入模板名 此时在templates目录下

android源码解析之(九)-->SystemServer进程启动流程

上面一文中我们讲过android系统中比较重要的几个进程:init进程,Zygote进程,SystemServer进程已经各种应用进程,其中Zygote进程是整个android系统的根进程,包含SystemServer进程已经各种应用进程在内的进程都是通过Zygote进程fork出来的,具体可参见:http://blog.csdn.net/qq_23547831/article/details/51104873 那么SystemServer进程是做什么用的呢? 其实SystemServer进程主

IIS 7 的 500 內部錯誤

印象中這個有名的錯誤提示從 ASP 時代就已經存在 不是很明白微軟怎麼想的 你們所面對的客戶族群有為數不少的開發人員 除錯環境對開發者來說算是基本配備 為何不把這些相關設定做成「出廠預設值」? 都幾年了,一點長進都沒有 碎碎念模式結束,回正題 一.需啟用的項目如下: 1. 將錯誤發送到瀏覽器 2. 啟用伺服器端偵錯 3. 啟用客戶端偵錯 4. 啟用父路徑 (非必要) 二.錯誤頁相關 1. 將 500 錯誤的頁面指向 %SystemDrive%\inetpub\custerr\<LANGUAGE-

request 参数获取

package com.jie.request.servlet; import java.io.IOException; import java.io.InputStream; import java.security.Principal; import java.util.Collection; import java.util.Enumeration; import java.util.Locale; import java.util.Map; import java.util.Map.En

背水一战 Windows 10 (81) - 全球化

原文:背水一战 Windows 10 (81) - 全球化 [源码下载] 作者:webabcd 介绍背水一战 Windows 10 之 全球化 Demo 格式化数字 示例1.演示全球化的基本应用Localization/GlobalizationDemo.xaml <Page x:Class="Windows10.Localization.GlobalizationDemo" xmlns="http://schemas.microsoft.com/winfx/2006/

如约而至,Java 10 正式发布!

3 月 20 日,Oracle 宣布 Java 10 正式发布. 官方已提供下载:http://www.oracle.com/technetwork/java/javase/downloads/index.html . 在 Java 9 之后,Java 采用了基于时间发布的策略,每 6 个月一个版本.这是采用新的发布策略之后的第一个版本. Java 10 主要有 12 个新特性. 具体来看看. JEP 286: Local-Variable Type Inference 局部变量的类型推导. 很

RFC2616-HTTP1.1-Header Field Definitions(头字段规定部分—单词注释版)

part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al. 14 Header Field Definitions(规定) This section(部分,章节) defines(规定定义) the syntax(语法) and semantics(语意) of all standard(标准) HTTP/1.1 header fields. For entity-header fields, both sen