Extension:CLDR/zh

CLDR 扩展包含从 CLDR 数据中提取的不同语言、国家、货币和时间单位的本地语言名称. 参见 CLDR 以获取更多信息.

安装
如果您从 git 下载，请将文件从 CLDR 更改为 cldr.



更新数据
CLDR 扩展附带语言文件中预填充的数据，但如果您想从 Unicode Consortium 获取最新数据，则需要从 CLDR 站点下载它，然后运行重构建脚本.

从 CLDR 站点下载最新数据：

http://www.unicode.org/cldr/repository_access.html

示例（来自 cldr 目录）：

Language names
CLDR defines the class LanguageNames which has a static method,. accepts three parameters:


 * 1) code - the ISO 639 (see Manual:Language#Language code for details) code of the preferred language to return the list in
 * 2) fbMethod - fallback method, it should be set to one of the following:
 * 3) * LanguageNames::FALLBACK_NATIVE - Missing entries fallback to the native name (default)
 * 4) * LanguageNames::FALLBACK_NORMAL - Missing entries fallback through the fallback chain
 * 5) list - which languages to return. Should be set to one of the following:
 * 6) * LanguageNames::LIST_MW_SUPPORTED - Only languages that have localization in MediaWiki
 * 7) * LanguageNames::LIST_MW - All languages that are in  (default)
 * 8) * LanguageNames::LIST_MW_AND_CLDR - All languages that are either in MediaWiki or in CLDR

Example
The language names are best access with MediaWiki core functions:



国家名称
CLDR defines the class  which has a static method,. accepts one parameter:


 * 1) code - the ISO 639 code of the preferred language to return the list in

示例
The following example sets a variable to the list of all countries in CLDR in French.

