mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 12:15:39 +08:00
Fallback to English if system-wide default_locale doesn't exist
This commit is contained in:
parent
d549e26a4b
commit
aa9e867f77
@ -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…
x
Reference in New Issue
Block a user