MediaWiki master
MediaWiki\Language\LazyLocalizationContext Class Reference

Wrapper for injecting a LocalizationContext with lazy initialization. More...

Inherits MediaWiki\Language\LocalizationContext.

Collaboration diagram for MediaWiki\Language\LazyLocalizationContext:

Public Member Functions

 __construct (callable $instantiator)
 
 getLanguageCode ()
 Returns the target language for UI localization.
 
 msg ( $key,... $params)
 This is the method for getting translated interface messages.
 

Detailed Description

Wrapper for injecting a LocalizationContext with lazy initialization.

Since
1.42

Definition at line 29 of file LazyLocalizationContext.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Language\LazyLocalizationContext::__construct ( callable $instantiator)
Parameters
callable$instantiator

Definition at line 39 of file LazyLocalizationContext.php.

Member Function Documentation

◆ getLanguageCode()

MediaWiki\Language\LazyLocalizationContext::getLanguageCode ( )

Returns the target language for UI localization.

Returns
Bcp47Code

Implements MediaWiki\Language\LocalizationContext.

Definition at line 51 of file LazyLocalizationContext.php.

◆ msg()

MediaWiki\Language\LazyLocalizationContext::msg ( $key,
$params )

This is the method for getting translated interface messages.

See also
https://www.mediawiki.org/wiki/Manual:Messages_API
Message::__construct
Parameters
string | string[] | MessageSpecifier$keyMessage key, or array of keys, or a MessageSpecifier.
mixed...$params Normal message parameters
Returns
Message

Implements MessageLocalizer.

Definition at line 55 of file LazyLocalizationContext.php.

References $params.


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