1
0
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:
Toby Zerner
2015-09-04 22:19:28 +09:30
parent d549e26a4b
commit aa9e867f77

View File

@@ -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;