icingaweb2/library/Icinga/Application/functions.php

32 lines
662 B
PHP
Raw Normal View History

<?php
2013-10-23 15:10:33 +02:00
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
use Icinga\Util\Translator;
if (extension_loaded('gettext')) {
function t($messageId)
{
return Translator::translate($messageId, Translator::DEFAULT_DOMAIN);
}
function mt($domain, $messageId)
{
return Translator::translate($messageId, $domain);
}
function mtp($domain, $messageId, $messageId2, $n)
{
return Translator::translatePlural($messageId, $messageId2, $n, $domain);
}
} else {
function t($messageId)
{
return $messageId;
}
function mt($domain, $messageId)
{
return $messageId;
}
}