MediaWiki REL1_37
|
Methods for dealing with language codes. More...
Static Public Member Functions | |
static | bcp47 ( $code) |
Get the normalised IETF language tag See unit test for examples. | |
static | getDeprecatedCodeMapping () |
Returns a mapping of deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes. | |
static | getNonstandardLanguageCodeMapping () |
Returns a mapping of non-standard language codes used by (current and previous version of) MediaWiki, mapped to standard BCP 47 names. | |
static | replaceDeprecatedCodes ( $code) |
Replace deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes. | |
|
static |
Get the normalised IETF language tag See unit test for examples.
See mediawiki.language.bcp47 for the JavaScript implementation.
string | $code | The language code. |
Definition at line 175 of file LanguageCode.php.
|
static |
Returns a mapping of deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes.
This array is merged into $wgDummyLanguageCodes in Setup.php, along with the fake language codes 'qqq' and 'qqx', which are used internally by MediaWiki's localisation system.
Definition at line 124 of file LanguageCode.php.
|
static |
Returns a mapping of non-standard language codes used by (current and previous version of) MediaWiki, mapped to standard BCP 47 names.
This array is exported to JavaScript to ensure mediawiki.language.bcp47 stays in sync with LanguageCode::bcp47().
Definition at line 140 of file LanguageCode.php.
|
static |
Replace deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes.
Other values will returned unchanged.
string | $code | Old language code |
Definition at line 161 of file LanguageCode.php.