RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln
This commit is contained in:
parent
8c9ab14daf
commit
21860028c5
|
|
@ -222,7 +222,7 @@ final class Localization implements LocalizationInterface
|
||||||
$localization = clone $this;
|
$localization = clone $this;
|
||||||
|
|
||||||
// Find language from address array or keep current language
|
// Find language from address array or keep current language
|
||||||
if (!$lang = Bootstrap::findLanguage($adresse['sprache'])) {
|
if (!$lang = Bootstrap::findLanguage($adresse['sprache'] ?? '')) {
|
||||||
$lang = Bootstrap::findLanguage($this->getLanguage());
|
$lang = Bootstrap::findLanguage($this->getLanguage());
|
||||||
}
|
}
|
||||||
if ($lang) {
|
if ($lang) {
|
||||||
|
|
@ -230,7 +230,7 @@ final class Localization implements LocalizationInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find region from address or keep current region
|
// Find region from address or keep current region
|
||||||
if (!$region = Bootstrap::findRegion($adresse['land'])) {
|
if (!$region = Bootstrap::findRegion($adresse['land'] ?? '')) {
|
||||||
$parsedLocale = Locale::parseLocale($this->getLocale());
|
$parsedLocale = Locale::parseLocale($this->getLocale());
|
||||||
$region = Bootstrap::findRegion($parsedLocale['region']);
|
$region = Bootstrap::findRegion($parsedLocale['region']);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue