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-01-29 16:25:08 +01:00
|
|
|
use \Icinga\Util\Translator;
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
} 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;
|
|
|
|
}
|
|
|
|
}
|