2013-06-07 11:44:37 +02:00
|
|
|
<?php
|
2013-10-23 15:10:33 +02:00
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
2013-06-07 11:44:37 +02:00
|
|
|
|
2014-08-27 15:51:49 +02:00
|
|
|
use Icinga\Util\Translator;
|
2014-01-29 16:25:08 +01:00
|
|
|
|
|
|
|
if (extension_loaded('gettext')) {
|
|
|
|
function t($messageId)
|
2013-06-07 11:44:37 +02:00
|
|
|
{
|
2014-06-11 13:39:22 +02:00
|
|
|
return Translator::translate($messageId, Translator::DEFAULT_DOMAIN);
|
2013-06-07 11:44:37 +02:00
|
|
|
}
|
|
|
|
|
2014-01-29 16:25:08 +01:00
|
|
|
function mt($domain, $messageId)
|
2013-06-07 11:44:37 +02:00
|
|
|
{
|
2014-01-29 16:25:08 +01:00
|
|
|
return Translator::translate($messageId, $domain);
|
2013-06-07 11:44:37 +02:00
|
|
|
}
|
2014-09-11 18:04:10 +02:00
|
|
|
function mtp($domain, $messageId, $messageId2, $n)
|
|
|
|
{
|
|
|
|
return Translator::translatePlural($messageId, $messageId2, $n, $domain);
|
|
|
|
}
|
2013-06-07 11:44:37 +02:00
|
|
|
} else {
|
2014-01-29 16:25:08 +01:00
|
|
|
function t($messageId)
|
2013-06-07 11:44:37 +02:00
|
|
|
{
|
|
|
|
return $messageId;
|
|
|
|
}
|
|
|
|
|
2014-01-29 16:25:08 +01:00
|
|
|
function mt($domain, $messageId)
|
2013-06-07 11:44:37 +02:00
|
|
|
{
|
|
|
|
return $messageId;
|
|
|
|
}
|
|
|
|
}
|