mirror of
https://github.com/flarum/core.git
synced 2025-07-22 17:21:27 +02:00
Only attempt to get default locale if db is up to date
This commit is contained in:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user