diff --git a/Controller/WebUIController.php b/Controller/WebUIController.php index 89d53a31..ed1a11ab 100644 --- a/Controller/WebUIController.php +++ b/Controller/WebUIController.php @@ -251,11 +251,11 @@ private function getMessageFromRequest(Request $request) */ private function getLocale2LanguageMap() { - $configuedLocales = $this->getParameter('php_translation.locales'); + $configuredLocales = $this->getParameter('php_translation.locales'); $names = Intl::getLocaleBundle()->getLocaleNames('en'); $map = []; - foreach ($configuedLocales as $l) { - $map[$l] = $names[$l]; + foreach ($configuredLocales as $l) { + $map[$l] = isset($names[$l]) ? $names[$l] : $l; } return $map;