Skip to content

Github mirror of MediaWiki extension cldr - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

wikimedia/mediawiki-extensions-cldr

Repository files navigation

mediawiki/extensions/cldr

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 );
	}

About

Github mirror of MediaWiki extension cldr - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages