summaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2018-06-27 20:03:28 +0200
committerGeorg Ehrke <developer@georgehrke.com>2018-06-27 21:52:19 +0200
commit9157086c23c8a82479084cc2c12a98f5f726ef5f (patch)
treed1ba2dfbf752b3a7f3c70fa5ee8471aa39560a7b /lib/private/L10N
parentb3921c65a68111aa319e75f546953f77ebd8008f (diff)
downloadnextcloud-server-9157086c23c8a82479084cc2c12a98f5f726ef5f.tar.gz
nextcloud-server-9157086c23c8a82479084cc2c12a98f5f726ef5f.zip
properly handle force_locale setting
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'lib/private/L10N')
-rw-r--r--lib/private/L10N/Factory.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 6d6f452738c..b8774c2f74e 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;