mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-23 23:43:54 +00:00
26 lines
466 B
PHP
26 lines
466 B
PHP
|
<?php
|
||
|
|
||
|
namespace MediaWiki\Extension\TemplateData;
|
||
|
|
||
|
use Language;
|
||
|
use MessageLocalizer;
|
||
|
|
||
|
class TemplateDataMessageLocalizer implements MessageLocalizer {
|
||
|
|
||
|
/** @var Language */
|
||
|
private $language;
|
||
|
|
||
|
/**
|
||
|
* @param Language $language
|
||
|
*/
|
||
|
public function __construct( Language $language ) {
|
||
|
$this->language = $language;
|
||
|
}
|
||
|
|
||
|
/** @inheritDoc */
|
||
|
public function msg( $key, ...$params ) {
|
||
|
return wfMessage( $key, ...$params )->inLanguage( $this->language );
|
||
|
}
|
||
|
|
||
|
}
|