From 86614ad7a89fd063c79e635300805ce75f861271 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 20 May 2021 09:46:11 +0200 Subject: [PATCH] layout: Identify language using ipl-i18n --- application/layouts/scripts/external-logout.phtml | 9 +++++++-- application/layouts/scripts/layout.phtml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/application/layouts/scripts/external-logout.phtml b/application/layouts/scripts/external-logout.phtml index 607ad4be5..19c35e4e2 100644 --- a/application/layouts/scripts/external-logout.phtml +++ b/application/layouts/scripts/external-logout.phtml @@ -1,8 +1,13 @@ language; +/** @var GettextTranslator $translator */ +$translator = StaticTranslator::$instance; + +$lang = (new Locale())->parseLocale($translator->getLocale())->language; $showFullscreen = $this->layout()->showFullscreen; $innerLayoutScript = $this->layout()->innerLayout . '.phtml'; diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml index 1d22c9798..1800f2c15 100644 --- a/application/layouts/scripts/layout.phtml +++ b/application/layouts/scripts/layout.phtml @@ -1,6 +1,8 @@ parseLocale($translator->getLocale())->language; $timezone = date_default_timezone_get(); -$lang = Translator::splitLocaleCode()->language; $isIframe = $this->layout()->isIframe; $showFullscreen = $this->layout()->showFullscreen; $iframeClass = $isIframe ? ' iframe' : '';