mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-27 17:20:01 +00:00
94573e1152
Change-Id: I7f27b0c42e15ab939749c9dbe9eb51754580ca87
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 );
|
|
}
|
|
|
|
}
|