From 9157086c23c8a82479084cc2c12a98f5f726ef5f Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 27 Jun 2018 20:03:28 +0200 Subject: [PATCH] properly handle force_locale setting Signed-off-by: Georg Ehrke --- lib/private/L10N/Factory.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 6d6f452738..b8774c2f74 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -207,6 +207,11 @@ class Factory implements IFactory { * @return null|string */ 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)) { $userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null; $userLocale = null;