Skip to content

Commit 6587665

Browse files
committed
Fallback to $lang if no $locale match
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
1 parent 7d158c6 commit 6587665

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/TemplateLayout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function __construct( $renderAs, $appId = '' ) {
138138

139139
}
140140
// Send the language and the locale to our layouts
141-
$lang = \OC::$server->getL10NFactory()->findLanguage();
141+
$c = \OC::$server->getL10NFactory()->findLanguage();
142142
$locale = \OC::$server->getL10NFactory()->findLocale($lang);
143143
$localeLang = \OC::$server->getL10NFactory()->findLanguageFromLocale('lib', $locale);
144144

@@ -162,7 +162,7 @@ public function __construct( $renderAs, $appId = '' ) {
162162
if ($this->config->getSystemValue('installed', false) && $renderAs != 'error') {
163163
if (\OC::$server->getContentSecurityPolicyNonceManager()->browserSupportsCspV3()) {
164164
$jsConfigHelper = new JSConfigHelper(
165-
\OC::$server->getL10N('lib', $localeLang),
165+
\OC::$server->getL10N('lib', $localeLang ? $localeLang : $lang),
166166
\OC::$server->query(Defaults::class),
167167
\OC::$server->getAppManager(),
168168
\OC::$server->getSession(),

0 commit comments

Comments
 (0)