mirror of
https://github.com/flarum/core.git
synced 2025-07-25 10:41:24 +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)) {
|
||||
return $this->settings->get('default_locale', 'en');
|
||||
$locale = $this->settings->get('default_locale', 'en');
|
||||
}
|
||||
|
||||
if (! $this->locales->hasLocale($locale)) {
|
||||
return 'en';
|
||||
}
|
||||
|
||||
return $locale;
|
||||
|
Reference in New Issue
Block a user