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 1f8f79d272
commit 478ca90c31

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;