Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more information.
More...
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more information.
- Since
- 1.35
Definition at line 42 of file LanguageFactory.php.
◆ __construct()
◆ classFromCode()
MediaWiki\Languages\LanguageFactory::classFromCode |
( |
|
$code, |
|
|
|
$fallback = true |
|
) |
| |
|
private |
- Parameters
-
string | $code | |
bool | $fallback | Whether we're going through language fallback chain |
- Returns
- string Name of the language class
Definition at line 192 of file LanguageFactory.php.
References $fallback.
◆ getLanguage()
MediaWiki\Languages\LanguageFactory::getLanguage |
( |
|
$code | ) |
|
Get a cached or new language object for a given language code.
- Parameters
-
- Exceptions
-
- Returns
- Language
Definition at line 108 of file LanguageFactory.php.
◆ getParentLanguage()
MediaWiki\Languages\LanguageFactory::getParentLanguage |
( |
|
$code | ) |
|
Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg.
zh for zh-cn, but not en for en-gb).
- Parameters
-
- Returns
- Language|null
- Since
- 1.22
Definition at line 208 of file LanguageFactory.php.
References $lang.
◆ newFromCode()
MediaWiki\Languages\LanguageFactory::newFromCode |
( |
|
$code, |
|
|
|
$fallback = false |
|
) |
| |
|
private |
Create a language object for a given language code.
- Parameters
-
string | $code | |
bool | $fallback | Whether we're going through language fallback chain |
- Exceptions
-
- Returns
- Language
Definition at line 147 of file LanguageFactory.php.
◆ $hookContainer
HookContainer MediaWiki\Languages\LanguageFactory::$hookContainer |
|
private |
◆ $langConverterFactory
◆ $langFallback
◆ $langNameUtils
◆ $langObjCache
array MediaWiki\Languages\LanguageFactory::$langObjCache = [] |
|
private |
◆ $localisationCache
◆ $options
◆ $parentLangCache
array MediaWiki\Languages\LanguageFactory::$parentLangCache = [] |
|
private |
The documentation for this class was generated from the following file: