Extension:CLDR

This extension contains local language names for different languages extracted from CLDR data.

Installation
Include it in LocalSettings.php: include("$IP/extensions/cldr/LanguageNames.php");

Updating data
Download newest data from CLDR site: http://www.unicode.org/cldr/repository_access.html

Example (from within the cldr directory): wget http://www.unicode.org/Public/cldr/1.8.0/core.zip unzip core.zip -d core php rebuild.php

Usage and parameters
CLDR defines the class LanguageNames which has a static method, getNames. LanguageNames::getNames accepts three parameters:
 * 1) code - the language code of the language to return the list in
 * 2) fbMethod - fallback method. Should be set to one of the following:
 * 3) * LanguageNames::FALLBACK_NATIVE (default): Missing entries fallback to the native name
 * 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 (default): All languages that are in Names.php
 * 8) * LanguageNames::LIST_MW_AND_CLDR: All languages that are either in MediaWiki or in CLDR

Example
The following example sets a variable to the list of all languages in MediaWiki and CLDR in English.