2017-06-22 02:03:54 +02:00
|
|
|
<?php
|
|
|
|
|
2017-10-09 15:23:27 +02:00
|
|
|
namespace dipl\Compat;
|
2017-06-22 02:03:54 +02:00
|
|
|
|
|
|
|
use Icinga\Util\Translator as WebTranslator;
|
2017-10-09 15:23:27 +02:00
|
|
|
use dipl\Translation\TranslatorInterface;
|
2017-06-22 02:03:54 +02:00
|
|
|
|
|
|
|
class Translator implements TranslatorInterface
|
|
|
|
{
|
|
|
|
/** @var string */
|
|
|
|
private $domain;
|
|
|
|
|
|
|
|
public function __construct($domain)
|
|
|
|
{
|
|
|
|
$this->domain = $domain;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function translate($string)
|
|
|
|
{
|
|
|
|
return WebTranslator::translate($string, $this->domain);
|
|
|
|
}
|
|
|
|
}
|