MediaWiki REL1_39
|
Public Member Functions | |
__construct ( $siteLangCode, LocalisationCache $localisationCache, LanguageNameUtils $langNameUtils) | |
Do not call this directly. | |
getAll ( $code, $mode=self::MESSAGES) | |
Get the ordered list of fallback languages. | |
getAllIncludingSiteLanguage ( $code) | |
Get the ordered list of fallback languages, ending with the fallback language chain for the site language. | |
getFirst ( $code) | |
Get the first fallback for a given language. | |
Public Attributes | |
const | MESSAGES = 0 |
Return a fallback chain for messages in getAll. | |
const | STRICT = 1 |
Return a strict fallback chain in getAll. | |
Definition at line 31 of file LanguageFallback.php.
MediaWiki\Languages\LanguageFallback::__construct | ( | $siteLangCode, | |
LocalisationCache | $localisationCache, | ||
LanguageNameUtils | $langNameUtils ) |
Do not call this directly.
Use MediaWikiServices.
string | $siteLangCode | Language code of the site, typically $wgLanguageCode |
LocalisationCache | $localisationCache | |
LanguageNameUtils | $langNameUtils |
Definition at line 64 of file LanguageFallback.php.
MediaWiki\Languages\LanguageFallback::getAll | ( | $code, | |
$mode = self::MESSAGES ) |
Get the ordered list of fallback languages.
string | $code | Language code |
int | $mode | Fallback mode, either MESSAGES (which always falls back to 'en'), or STRICT (which only falls back to 'en' when explicitly defined) |
InvalidArgumentException | If $mode is invalid |
Definition at line 95 of file LanguageFallback.php.
References MediaWiki\Languages\LanguageFallback\MESSAGES, and MediaWiki\Languages\LanguageFallback\STRICT.
Referenced by MediaWiki\Languages\LanguageFallback\getAllIncludingSiteLanguage(), and MediaWiki\Languages\LanguageFallback\getFirst().
MediaWiki\Languages\LanguageFallback::getAllIncludingSiteLanguage | ( | $code | ) |
Get the ordered list of fallback languages, ending with the fallback language chain for the site language.
The site fallback list begins with the site language itself.
string | $code | Language code |
Definition at line 136 of file LanguageFallback.php.
References MediaWiki\Languages\LanguageFallback\getAll().
MediaWiki\Languages\LanguageFallback::getFirst | ( | $code | ) |
Get the first fallback for a given language.
string | $code |
Definition at line 81 of file LanguageFallback.php.
References MediaWiki\Languages\LanguageFallback\getAll().
const MediaWiki\Languages\LanguageFallback::MESSAGES = 0 |
Return a fallback chain for messages in getAll.
Definition at line 36 of file LanguageFallback.php.
Referenced by MediaWiki\Languages\LanguageFallback\getAll().
const MediaWiki\Languages\LanguageFallback::STRICT = 1 |
Return a strict fallback chain in getAll.
Definition at line 42 of file LanguageFallback.php.
Referenced by MediaWiki\Languages\LanguageFallback\getAll().