mirror of
https://github.com/flarum/core.git
synced 2025-07-29 20:50:28 +02:00
Fallback to English if system-wide default_locale doesn't exist
This commit is contained in:
@@ -248,7 +248,11 @@ abstract class ClientAction extends HtmlAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $locale || ! $this->locales->hasLocale($locale)) {
|
if (! $locale || ! $this->locales->hasLocale($locale)) {
|
||||||
return $this->settings->get('default_locale', 'en');
|
$locale = $this->settings->get('default_locale', 'en');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->locales->hasLocale($locale)) {
|
||||||
|
return 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $locale;
|
return $locale;
|
||||||
|
Reference in New Issue
Block a user