Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageBundleTranslation\MessageBundleTranslationLoader Class Reference

Public Member Functions

 __construct (LanguageFallback $languageFallback)
 
 get (MessageBundle $messageBundle, string $languageCode, bool $skipFallbacks)
 Given a language code, returns translation for that language or its fallbacks in an array format.
 

Detailed Description

Definition at line 11 of file MessageBundleTranslationLoader.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\MessageBundleTranslation\MessageBundleTranslationLoader::__construct ( LanguageFallback $languageFallback)

Definition at line 14 of file MessageBundleTranslationLoader.php.

Member Function Documentation

◆ get()

MediaWiki\Extension\Translate\MessageBundleTranslation\MessageBundleTranslationLoader::get ( MessageBundle $messageBundle,
string $languageCode,
bool $skipFallbacks )

Given a language code, returns translation for that language or its fallbacks in an array format.

Parameters
MessageBundle$messageBundle
string$languageCode
bool$skipFallbacksSkip loading the fallback languages
Returns
array<string, string> Key is the key in the message bundle, value is the translation.

Definition at line 25 of file MessageBundleTranslationLoader.php.


The documentation for this class was generated from the following file: