mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Fallback to English if system-wide default_locale doesn't exist
This commit is contained in:
parent
1f8f79d272
commit
478ca90c31
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user