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; }); } }