diff options
Diffstat (limited to 'lib/private/L10N')
-rw-r--r-- | lib/private/L10N/Factory.php | 2 | ||||
-rw-r--r-- | lib/private/L10N/LanguageIterator.php | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index a1afb1f4f0a..03240f48410 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -72,7 +72,7 @@ class Factory implements IFactory { */ protected $pluralFunctions = []; - const COMMON_LANGUAGE_CODES = [ + public const COMMON_LANGUAGE_CODES = [ 'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko' ]; diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php index 0670ac56503..a03ec114ef9 100644 --- a/lib/private/L10N/LanguageIterator.php +++ b/lib/private/L10N/LanguageIterator.php @@ -64,6 +64,7 @@ class LanguageIterator implements ILanguageIterator { } $this->next(); /** @noinspection PhpMissingBreakStatementInspection */ + // no break case 1: $forcedLang = $this->config->getSystemValue('force_language', false); if (is_string($forcedLang) @@ -73,6 +74,7 @@ class LanguageIterator implements ILanguageIterator { } $this->next(); /** @noinspection PhpMissingBreakStatementInspection */ + // no break case 2: $userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null); if (is_string($userLang)) { @@ -80,6 +82,7 @@ class LanguageIterator implements ILanguageIterator { } $this->next(); /** @noinspection PhpMissingBreakStatementInspection */ + // no break case 3: $userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null); if (is_string($userLang) @@ -88,6 +91,7 @@ class LanguageIterator implements ILanguageIterator { return $truncated; } $this->next(); + // no break case 4: return $this->config->getSystemValue('default_language', 'en'); /** @noinspection PhpMissingBreakStatementInspection */ @@ -97,6 +101,7 @@ class LanguageIterator implements ILanguageIterator { return $truncated; } $this->next(); + // no break default: return 'en'; } |