diff --git a/app/Providers/NinjaTranslationServiceProvider.php b/app/Providers/NinjaTranslationServiceProvider.php index 172de1ebb9..d76aaeabb9 100644 --- a/app/Providers/NinjaTranslationServiceProvider.php +++ b/app/Providers/NinjaTranslationServiceProvider.php @@ -33,7 +33,8 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider * */ - $this->app->singleton('translator', function ($app) { + $this->app->bind('translator', function($app) { + $loader = $app['translation.loader']; $locale = $app['config']['app.locale']; @@ -42,6 +43,20 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider $trans->setFallback($app['config']['app.fallback_locale']); return $trans; + }); + + // $this->app->singleton('translator', function ($app) { + + // $loader = $app['translation.loader']; + // $locale = $app['config']['app.locale']; + + // $trans = new NinjaTranslator($loader, $locale); + + // $trans->setFallback($app['config']['app.fallback_locale']); + + // return $trans; + + // }); } }