mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
Also check language helper after shortening
This commit is contained in:
parent
59a02af2b7
commit
759933e24b
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue