mediawiki-extensions-Templa.../includes/TemplateDataMessageLocalizer.php

29 lines
512 B
PHP
Raw Normal View History

<?php
namespace MediaWiki\Extension\TemplateData;
use Language;
use MessageLocalizer;
/**
* @codeCoverageIgnore Trivial facade
*/
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 );
}
}