LanguageTag
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
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 = *3ALPHA ; shortest ISO code
["-" extlang] ; sometimes followed by
; extended language subtags
/ 4ALPHA ; or reserved for future use
/ *8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO codes
*("-" 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO code region = 2ALPHA ; ISO - code
/ 3DIGIT ; UN M. code variant = *8alphanum ; registered variants
/ (DIGIT 3alphanum) extension = singleton *("-" (*8alphanum)) ; Single alphanumerics
; "x" reserved for private use
singleton = DIGIT ; -
/ %x41- ; A - W
/ %x59-5A ; Y - Z
/ %x61- ; a - w
/ %x79-7A ; y - z privateuse = "x" *("-" (*8alphanum)) grandfathered = irregular ; non-redundant tags registered
/ regular ; during the RFC 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的更多相关文章
- JS魔法堂:不完全国际化&本地化手册 之 理論篇
前言 最近加入到新项目组负责前端技术预研和选型,其中涉及到一个熟悉又陌生的需求--国际化&本地化.熟悉的是之前的项目也玩过,陌生的是之前的实现仅仅停留在"有"的阶段而已. ...
- JS魔法堂:不完全国际化&本地化手册 之 实战篇
前言 最近加入到新项目组负责前端技术预研和选型,其中涉及到一个熟悉又陌生的需求--国际化&本地化.熟悉的是之前的项目也玩过,陌生的是之前的实现仅仅停留在"有"的阶段而已. ...
- JS魔法堂:不完全国际化&本地化手册 之 拓展篇
前言 最近加入到新项目组负责前端技术预研和选型,其中涉及到一个熟悉又陌生的需求--国际化&本地化.熟悉的是之前的项目也玩过,陌生的是之前的实现仅仅停留在"有"的阶段而已. ...
- Win10 UWP 开发系列:使用多语言工具包让应用支持多语言
之前我在一篇blog中写过如何使用多语言工具包,见http://www.cnblogs.com/yanxiaodi/p/3800767.html 在WinEcos社区也发布过一篇详细的文章介绍多语言工 ...
- IIS 7 的 500 內部錯誤
印象中這個有名的錯誤提示從 ASP 時代就已經存在 不是很明白微軟怎麼想的 你們所面對的客戶族群有為數不少的開發人員 除錯環境對開發者來說算是基本配備 為何不把這些相關設定做成「出廠預設值」? 都幾年 ...
- 在UWP应用中加入Cortana语音指令集
本文介绍小娜语音指令集的使用场景,如何将UWP应用接入小娜的语音指令集,使用户直接通过小娜启动应用并使用应用中 一些轻量级的功能.文中以必应词典作为实例讲解必应词典UWP版本是如何接入小娜语音功能的. ...
- RFC-2068-http
本文档规定了互联网社区的标准组协议,并需要讨论和建议以便更加完善.请参考 “互联网官方协议标准”(STD 1)来了解本协议的标准化状态.本协议不限流传发布. 版权声明 Copyright (C) Th ...
- 重新想象 Windows 8 Store Apps (57) - 本地化和全球化
[源码下载] 重新想象 Windows 8 Store Apps (57) - 本地化和全球化 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 本地化和全球化 本地化 ...
- HTTP - 首部
首部类型 首部类型 说明 通用首部 客户端和服务器都可以使用的通用首部.可以在客户端.服务器和其他应用程序之间提供一些有用的通用首部. 请求首部 请求首部时请求报文特有的.它们为服务器提供 ...
随机推荐
- Hadoop生态圈-phoenix(HBase)的索引配置
Hadoop生态圈-phoenix(HBase)的索引配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 创建索引是为了优化查询,我们可以在phoenix上配置索引方式. 一.修改 ...
- day9 类、对象、包
结构化编程中,程序围绕要解决的问题来设计. 面向对象编程,围绕要解决问题的对象来设计. 万物皆对象,对象因关注而产生!!! 类——抽取具有相同属性和行为的对象. 属性就是对象身上的值数据,行为就是对象 ...
- wepy
npm install -g cnpm --registry=https://registry.npm.taobao.org https://blog.csdn.net/qq_40414159/art ...
- css overflow用法
1. overflow-y: auto 侧边栏滚动效果:overflow-y:auto 2. overflow-y: scroll 如果使用overflow:scroll的话,滚动条就一直都在,页面不 ...
- 编译的java工程压缩上传到linux服务器上后,中文的类名显示乱码
首先声明,类名是用中文命名的,这个别人写的,不允许修改. 本地用7zip软件压缩成zip包,传到服务器解压,发现中文的class文件名称是乱码. 解决办法: 方法一:使用jar命令打成jar包,传到服 ...
- bzoj千题计划121:bzoj1033: [ZJOI2008]杀蚂蚁antbuster
http://www.lydsy.com/JudgeOnline/problem.php?id=1033 经半个下午+一个晚上+半个晚上 的 昏天黑地调代码 最终成果: codevs.洛谷.tyvj上 ...
- 你知道吗?10个精妙的 Java 编码最佳实践
这是一个比Josh Bloch的Effective Java规则更精妙的10条Java编码实践的列表.和Josh Bloch的列表容易学习并且关注日常情况相比,这个列表将包含涉及API/SPI设计中不 ...
- [php]mysql操作流程
这种是比较老的一种mysql连接方法 1.连接数据库 $this->con = mysql_connect($this->host, $this->user, $this->p ...
- 守卫者的挑战(guard)
problem Pro 打开了黑魔法师Vani的大门,队员们在迷宫般的路上漫无目的地搜寻着关押applepi的监狱的所在地.突然,眼前一道亮光闪过.“我,Nizem,是黑魔法圣殿的守卫者.如果你能通过 ...
- DataTable转任意类型对象List数组-----工具通用类(利用反射和泛型)
public class ConvertHelper<T> where T : new() { /// <summary> /// 利用反射和泛型 /// </summa ...