mediawiki / cldr
CLDR extension contains local language names for different languages, countries, and currencies extracted from CLDR data
Package info
github.com/wikimedia/mediawiki-extensions-cldr
Type:mediawiki-extension
pkg:composer/mediawiki/cldr
2026.02
2026-03-16 04:50 UTC
Requires
- composer/installers: >=1.0.1
Requires (Dev)
This package is auto-updated.
Last update: 2026-06-12 06:23:57 UTC
README
This extension extracts a subset of core CLDR data and makes it available to PHP.
Currently, it provides the following:
- Country names
- Currency names and symbols
- Language names
- Units of time
Installation
Clone the source to MediaWiki extensions/ and enable it in LocalSettings.php:
wfLoadExtension( 'cldr' );
Updating data
Look up the latest release of CLDR and note the version number.
Update the version number in CLDR_CORE_URL in Makefile. Run make:
make all
Example usage
if ( ExtensionRegistry::isLoaded( 'cldr' ) ) { // Get the English translation of all available language names. $languages = LanguageNames::getNames( 'en' , LanguageNames::FALLBACK_NATIVE, LanguageNames::LIST_MW_AND_CLDR ); } else { // Fall back to the MediaWiki core function without CLDR. $languages = Language::getLanguageNames( false ); }