From 759933e24be4662eaa5c85f550ec080d5b1cb52f Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 24 Mar 2024 19:19:54 +0100 Subject: [PATCH] Also check language helper after shortening --- .../v/0.0.0/app/libraries/RainLoop/Actions/Localization.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Localization.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Localization.php index 296b5ddc4..3df7f3b95 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Localization.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Localization.php @@ -63,6 +63,9 @@ trait Localization if (\str_contains($sLanguage, '-')) { $sLanguage = \strtok($sLanguage, '-'); + if (isset($aHelper[$sLanguage])) { + $sLanguage = $aHelper[$sLanguage]; + } if (\in_array($sLanguage, $aLang)) { return $sLanguage; } @@ -73,6 +76,9 @@ trait Localization } if (\str_contains($sDefault, '-')) { $sDefault = \strtok($sDefault, '-'); + if (isset($aHelper[$sDefault])) { + $sDefault = $aHelper[$sDefault]; + } if (\in_array($sDefault, $aLang)) { return $sDefault; }