Take the fallback_locale from app.config when locale is not defined in shop

This commit is contained in:
Dirk Helbert 2019-12-01 22:59:16 +01:00
parent 3c9995f5bb
commit 02ca34affa
1 changed files with 7 additions and 1 deletions

View File

@ -211,7 +211,13 @@ class Core
if ($locale)
return $locale;
return $locale = $this->localeRepository->findOneByField('code', app()->getLocale());
$locale = $this->localeRepository->findOneByField('code', app()->getLocale());
if(!$locale) {
$locale = $this->localeRepository->findOneByField('code', config('app.fallback_locale'));
}
return $locale;
}
/**