Index of /wiki2/extensions/cldr/
Name | Last Modified | Size |
---|---|---|
Parent Directory | ||
CldrCurrency | 2022-11-25 05:47 | - |
CldrNames | 2022-11-25 05:47 | - |
CldrSupplemental | 2022-11-25 05:47 | - |
i18n | 2022-11-25 05:47 | - |
LocalNames | 2022-11-25 05:47 | - |
tests | 2022-11-25 05:47 | - |
cldr.php | 2017-02-15 10:53 | 1k |
CldrCurrencies.php | 2017-02-15 10:53 | 5k |
CldrNames.php | 2017-02-15 10:53 | 1k |
composer.json | 2017-02-15 10:53 | 1k |
COPYING | 2017-02-15 10:53 | 19k |
CountryNames.body.php | 2017-02-15 10:53 | 3k |
CurrencyNames.body.php | 2017-02-15 10:53 | 3k |
extension.json | 2017-02-15 10:54 | 1k |
Gruntfile.js | 2017-02-15 10:54 | 5k |
LanguageNames.body.php | 2017-02-15 10:54 | 4k |
LICENSE | 2017-02-15 10:54 | 3k |
Makefile | 2017-02-15 10:54 | 1k |
package.json | 2017-02-15 10:54 | 1k |
phpcs.xml | 2017-02-15 10:54 | 1k |
rebuild.php | 2017-02-15 10:54 | 14k |
RELEASE-NOTES | 2017-02-15 10:54 | 1k |
TimeUnits.body.php | 2017-02-15 10:54 | 6k |
This extension contains local language names for different languages extracted
from CLDR data.
== Installation ==
Include it in LocalSettings.php:
include("$IP/extensions/cldr/cldr.php");
== Updating data ==
Download newest data from CLDR site:
http://www.unicode.org/cldr/repository_access.html
Example:
wget http://unicode.org/Public/cldr/28/core.zip
unzip core.zip -d core
php rebuild.php
== Usage ==
<source lang=php>
if ( is_callable( array( 'LanguageNames', 'getNames' ) ) ) {
$languages = LanguageNames::getNames( 'en' ,
LanguageNames::FALLBACK_NORMAL,
LanguageNames::LIST_MW_AND_CLDR
);
} else {
// If need to display something, use this as fallback
$languages = Language::getLanguageNames( false );
}
</source>
=== Parameters ===
For fallback:
* '''FALLBACK_NATIVE''': Go straight to MediaWiki's name entries
* '''FALLBACK_NORMAL''': Go trough the fallback chain
For which languages to return:
* '''LIST_MW_SUPPORTED''': Only languages that has localisation in MediaWiki
* '''LIST_MW''': All languages that are in Names.php
* '''LIST_MW_AND_CLDR''': All languages that are either in MediaWiki or in cldr
Proudly Served by LiteSpeed Web Server at datastreetconsulting.com Port 80