Extension:CLDR

The CLDR extension contains local language names for different languages, countries, currencies, and time units extracted from CLDR data. See CLDR for information.

Installation
If you download from git, change the file from CLDR to cldr.

Updating data
The CLDR extension comes with data pre-populated in the language files, but if you want to get the latest data from the Unicode Consortium, you'll need to download it from the CLDR site and then run a rebuild script.

Download newest data from CLDR site:

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

Example (from within the cldr directory):

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


 * 1) code - the ISO 639 (see here 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:

Country names
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

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

Currency names
CLDR defines the class   which has a static method,  . <tvar|1> </> accepts one parameter:


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

Example
The following example sets a variable to the list of all currencies in CLDR in German.