Fix: Correcting Language Line fallback resolver
This commit is contained in:
@@ -16,10 +16,21 @@ use Modules\Core\Localization\Listeners\FlushTranslationCache;
|
||||
use Modules\Core\Localization\Listeners\LogTranslationActivity;
|
||||
use Modules\Core\Localization\Listeners\MigrateTranslationsForRenamedLanguage;
|
||||
use Modules\Core\Localization\Middleware\LocaleMiddleware;
|
||||
use Modules\Core\Localization\Models\LanguageLine;
|
||||
use Modules\Core\Localization\Observers\LanguageCacheObserver;
|
||||
|
||||
class LocalizationServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function register(): void
|
||||
{
|
||||
// Must run before Spatie\TranslationLoader\TranslationServiceProvider's
|
||||
// register() merges its own config defaults - mergeConfigFrom() only fills
|
||||
// in keys not already set, so setting this here (regardless of provider
|
||||
// boot order) makes it win over the package's default
|
||||
// Spatie\TranslationLoader\LanguageLine::class.
|
||||
config(['translation-loader.model' => LanguageLine::class]);
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
$this->app['router']->aliasMiddleware('locale', LocaleMiddleware::class);
|
||||
|
||||
Reference in New Issue
Block a user