original_string: public function register(Application $app)
      {
          /** @var ApplicationConfiguration $config */
          $config = $app['config'];
  
          $app['translator.locale'] = $config->getTranslator()->getLocale();
  
          $app['translator'] = $app->share(
              function ($app) {
                  $translator = new Translator();
                  $translator->setLocale($app['translator.locale']);
  
                  return $translator;
              }
          );
      }
code: public function register(Application $app)
      {
          /** @var ApplicationConfiguration $config */
          $config = $app['config'];
  
          $app['translator.locale'] = $config->getTranslator()->getLocale();
  
          $app['translator'] = $app->share(
              function ($app) {
                  $translator = new Translator();
                  $translator->setLocale($app['translator.locale']);
  
                  return $translator;
              }
          );
      }
code_tokens: public function register ( Application $ app ) { /** @var ApplicationConfiguration $config */ $ config = $ app [ 'config' ] ; $ app [ 'translator.locale' ] = $ config -> getTranslator ( ) -> getLocale ( ) ; $ app [ 'translator' ] = $ app -> share ( function ( $ app ) { $ translator = new Translator ( ) ; $ translator -> setLocale ( $ app [ 'translator.locale' ] ) ; return $ translator ; } ) ; }
docstring: Registers the translator using the currently active locale.
  
  @param Application $app
docstring_tokens: Registers the translator using the currently active locale .