MediaWiki REL1_31
|
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 | replaceDeprecatedCodes ( $code) |
Replace deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes. | |
Static Private Attributes | |
static array | $deprecatedLanguageCodeMapping |
Mapping of 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 94 of file LanguageCode.php.
References $code.
Referenced by MediaWiki\Preferences\DefaultPreferencesFactory\profilePreferences().
|
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 63 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 77 of file LanguageCode.php.
References $code.
|
staticprivate |
Mapping of deprecated language codes that were used in previous versions of MediaWiki to up-to-date, current language codes.
Mapping from language code to language code
Definition at line 38 of file LanguageCode.php.