original_string: private function loadLanguages()
      {
          $app = $this->app;
          $engine = $this;
          $languages = $app['config.app.languages'];
          $app['multi_languages'] = count($languages) > 1;
  
          $app->register(new LocaleServiceProvider());
          $app->register(new TranslationServiceProvider(), [
              'locale_fallbacks' => $languages,
          ]);
  
          $app['translator.domains'] = function () use ($app, $engine) {
              $translator_domains = [
                  'messages' => [],
                  'validators' => [],
              ];
              $languages = $app['config.app.languages'];
  
              foreach ($languages as $language) {
                  if (is_readable($engine->getAppPath('language').DIRECTORY_SEPARATOR.strtolower($language).'.php')) {
                      $trans = include $engine->getAppPath('language').DIRECTORY_SEPARATOR.strtolower($language).'.php';
                      $translator_domains['messages'][$language] = isset($trans['messages']) ? $trans['messages'] : [];
                      $translator_domains['validators'][$language] = isset($trans['validators']) ? $trans['validators'] : [];
                  }
              }
  
              return $translator_domains;
          };
      }
code: private function loadLanguages()
      {
          $app = $this->app;
          $engine = $this;
          $languages = $app['config.app.languages'];
          $app['multi_languages'] = count($languages) > 1;
  
          $app->register(new LocaleServiceProvider());
          $app->register(new TranslationServiceProvider(), [
              'locale_fallbacks' => $languages,
          ]);
  
          $app['translator.domains'] = function () use ($app, $engine) {
              $translator_domains = [
                  'messages' => [],
                  'validators' => [],
              ];
              $languages = $app['config.app.languages'];
  
              foreach ($languages as $language) {
                  if (is_readable($engine->getAppPath('language').DIRECTORY_SEPARATOR.strtolower($language).'.php')) {
                      $trans = include $engine->getAppPath('language').DIRECTORY_SEPARATOR.strtolower($language).'.php';
                      $translator_domains['messages'][$language] = isset($trans['messages']) ? $trans['messages'] : [];
                      $translator_domains['validators'][$language] = isset($trans['validators']) ? $trans['validators'] : [];
                  }
              }
  
              return $translator_domains;
          };
      }
code_tokens: private function loadLanguages ( ) { $ app = $ this -> app ; $ engine = $ this ; $ languages = $ app [ 'config.app.languages' ] ; $ app [ 'multi_languages' ] = count ( $ languages ) > 1 ; $ app -> register ( new LocaleServiceProvider ( ) ) ; $ app -> register ( new TranslationServiceProvider ( ) , [ 'locale_fallbacks' => $ languages , ] ) ; $ app [ 'translator.domains' ] = function ( ) use ( $ app , $ engine ) { $ translator_domains = [ 'messages' => [ ] , 'validators' => [ ] , ] ; $ languages = $ app [ 'config.app.languages' ] ; foreach ( $ languages as $ language ) { if ( is_readable ( $ engine -> getAppPath ( 'language' ) . DIRECTORY_SEPARATOR . strtolower ( $ language ) . '.php' ) ) { $ trans = include $ engine -> getAppPath ( 'language' ) . DIRECTORY_SEPARATOR . strtolower ( $ language ) . '.php' ; $ translator_domains [ 'messages' ] [ $ language ] = isset ( $ trans [ 'messages' ] ) ? $ trans [ 'messages' ] : [ ] ; $ translator_domains [ 'validators' ] [ $ language ] = isset ( $ trans [ 'validators' ] ) ? $ trans [ 'validators' ] : [ ] ; } } return $ translator_domains ; } ; }
docstring: Load languages.
docstring_tokens: Load languages .