diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-06-22 12:47:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 12:47:00 -0500 |
commit | d611d9c126e677b29466f537a4166cfd0ea5de2a (patch) | |
tree | a74f99aaa4300179b094064cd1da232ff98e6cde /lib | |
parent | 65b4e2a1db8642086d5415df6219b7c33d9399f1 (diff) | |
parent | 07a0f95ebf676b31514a5cbb55025dc121a985a6 (diff) | |
download | nextcloud-server-d611d9c126e677b29466f537a4166cfd0ea5de2a.tar.gz nextcloud-server-d611d9c126e677b29466f537a4166cfd0ea5de2a.zip |
Merge pull request #5498 from nextcloud/allow-to-force-a-language
Allow to force a language and set it via the ocs api
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 1 | ||||
-rw-r--r-- | lib/private/L10N/Factory.php | 8 |
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 02979b426b9..33b96d29ac6 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -810,7 +810,6 @@ return array( 'OC\\Settings\\Controller\\GroupsController' => $baseDir . '/settings/Controller/GroupsController.php', 'OC\\Settings\\Controller\\LogSettingsController' => $baseDir . '/settings/Controller/LogSettingsController.php', 'OC\\Settings\\Controller\\MailSettingsController' => $baseDir . '/settings/Controller/MailSettingsController.php', - 'OC\\Settings\\Controller\\PersonalController' => $baseDir . '/settings/Controller/PersonalController.php', 'OC\\Settings\\Controller\\SecuritySettingsController' => $baseDir . '/settings/Controller/SecuritySettingsController.php', 'OC\\Settings\\Controller\\UsersController' => $baseDir . '/settings/Controller/UsersController.php', 'OC\\Settings\\Hooks' => $baseDir . '/settings/Hooks.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 5f9e571a687..6f93d83c316 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -840,7 +840,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Settings\\Controller\\GroupsController' => __DIR__ . '/../../..' . '/settings/Controller/GroupsController.php', 'OC\\Settings\\Controller\\LogSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/LogSettingsController.php', 'OC\\Settings\\Controller\\MailSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/MailSettingsController.php', - 'OC\\Settings\\Controller\\PersonalController' => __DIR__ . '/../../..' . '/settings/Controller/PersonalController.php', 'OC\\Settings\\Controller\\SecuritySettingsController' => __DIR__ . '/../../..' . '/settings/Controller/SecuritySettingsController.php', 'OC\\Settings\\Controller\\UsersController' => __DIR__ . '/../../..' . '/settings/Controller/UsersController.php', 'OC\\Settings\\Hooks' => __DIR__ . '/../../..' . '/settings/Hooks.php', diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 581ca3fb5d1..399bebb8189 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -99,6 +99,12 @@ class Factory implements IFactory { if ($lang !== null) { $lang = str_replace(array('\0', '/', '\\', '..'), '', (string) $lang); } + + $forceLang = $this->config->getSystemValue('force_language', false); + if (is_string($forceLang)) { + $lang = $forceLang; + } + if ($lang === null || !$this->languageExists($app, $lang)) { $lang = $this->findLanguage($app); } @@ -125,7 +131,7 @@ class Factory implements IFactory { } /** - * At this point ownCloud might not yet be installed and thus the lookup + * At this point Nextcloud might not yet be installed and thus the lookup * in the preferences table might fail. For this reason we need to check * whether the instance has already been installed * |