properly handle force_locale setting

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2018-06-27 20:03:28 +02:00
parent b3921c65a6
commit 9157086c23
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
1 changed files with 5 additions and 0 deletions

View File

@ -207,6 +207,11 @@ class Factory implements IFactory {
* @return null|string * @return null|string
*/ */
public function findLocale($lang = null) { public function findLocale($lang = null) {
$forceLocale = $this->config->getSystemValue('force_locale', false);
if (is_string($forceLocale) && $this->localeExists($forceLocale)) {
return $forceLocale;
}
if ($this->config->getSystemValue('installed', false)) { if ($this->config->getSystemValue('installed', false)) {
$userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null; $userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null;
$userLocale = null; $userLocale = null;