layout: Identify language using ipl-i18n
This commit is contained in:
parent
84757111d1
commit
86614ad7a8
|
@ -1,8 +1,13 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Util\Translator;
|
||||
use ipl\I18n\Locale;
|
||||
use ipl\I18n\GettextTranslator;
|
||||
use ipl\I18n\StaticTranslator;
|
||||
|
||||
$lang = Translator::splitLocaleCode()->language;
|
||||
/** @var GettextTranslator $translator */
|
||||
$translator = StaticTranslator::$instance;
|
||||
|
||||
$lang = (new Locale())->parseLocale($translator->getLocale())->language;
|
||||
$showFullscreen = $this->layout()->showFullscreen;
|
||||
$innerLayoutScript = $this->layout()->innerLayout . '.phtml';
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Util\Translator;
|
||||
use ipl\I18n\Locale;
|
||||
use ipl\I18n\GettextTranslator;
|
||||
use ipl\I18n\StaticTranslator;
|
||||
use ipl\Web\Widget\Icon;
|
||||
|
||||
if (array_key_exists('_dev', $_GET)) {
|
||||
|
@ -11,8 +13,11 @@ if (array_key_exists('_dev', $_GET)) {
|
|||
$cssfile = 'css/icinga.min.css';
|
||||
}
|
||||
|
||||
/** @var GettextTranslator $translator */
|
||||
$translator = StaticTranslator::$instance;
|
||||
|
||||
$lang = (new Locale())->parseLocale($translator->getLocale())->language;
|
||||
$timezone = date_default_timezone_get();
|
||||
$lang = Translator::splitLocaleCode()->language;
|
||||
$isIframe = $this->layout()->isIframe;
|
||||
$showFullscreen = $this->layout()->showFullscreen;
|
||||
$iframeClass = $isIframe ? ' iframe' : '';
|
||||
|
|
Loading…
Reference in New Issue