You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only the UriLocalizer is not following the package's naming convention. I propose to change it to "translation.uri.localizer", and the respective Facade can handle the Name->Instance-Name translation.
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator');
parent::register();
$this->registerCacheRepository();
$this->registerFileLoader();
$this->registerCacheFlusher();
$this->app->singleton('translation.uri.localizer', UriLocalizer::class);
$this->app[\Illuminate\Routing\Router::class]->middleware('localize', TranslationMiddleware::class);
// Fix issue with laravel prepending the locale to localize resource routes:
$this->app->bind('Illuminate\Routing\ResourceRegistrar', ResourceRegistrar::class);
}
protected static function getFacadeAccessor()
{
return 'translation.uri.localizer';
}
With these, the package's namespace would be consistent inside the bootstrap/cache/services.php
Only the UriLocalizer is not following the package's naming convention. I propose to change it to "translation.uri.localizer", and the respective Facade can handle the Name->Instance-Name translation.
With these, the package's namespace would be consistent inside the bootstrap/cache/services.php
Or whatever name you choose that exhibits a more consistent convention, it'd be great!
The text was updated successfully, but these errors were encountered: