mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 09:00:55 +08:00
Only attempt to get default locale if db is up to date
This commit is contained in:
parent
b869fb7068
commit
d5538f4931
@ -37,7 +37,9 @@ class LocaleServiceProvider extends AbstractServiceProvider
|
||||
$this->app->alias('Flarum\Locale\LocaleManager', 'flarum.localeManager');
|
||||
|
||||
$this->app->singleton('translator', function () {
|
||||
$defaultLocale = $this->app->isInstalled() ? $this->app->make('flarum.settings')->get('default_locale') : 'en';
|
||||
$defaultLocale = $this->app->isInstalled() && $this->app->isUpToDate()
|
||||
? $this->app->make('flarum.settings')->get('default_locale', 'en')
|
||||
: 'en';
|
||||
|
||||
$translator = new Translator($defaultLocale, new MessageSelector());
|
||||
$translator->setFallbackLocales([$defaultLocale]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user