original_string: protected static function translator()
      {
          if (static::$translator === null) {
              $translator = new Translator('en');
              $translator->addLoader('array', new ArrayLoader());
              static::$translator = $translator;
              static::setLocale('en');
          }
  
          return static::$translator;
      }
code: protected static function translator()
      {
          if (static::$translator === null) {
              $translator = new Translator('en');
              $translator->addLoader('array', new ArrayLoader());
              static::$translator = $translator;
              static::setLocale('en');
          }
  
          return static::$translator;
      }
code_tokens: protected static function translator ( ) { if ( static :: $ translator === null ) { $ translator = new Translator ( 'en' ) ; $ translator -> addLoader ( 'array' , new ArrayLoader ( ) ) ; static :: $ translator = $ translator ; static :: setLocale ( 'en' ) ; } return static :: $ translator ; }
docstring: Intialize the translator instance if necessary.
  
  @return TranslatorInterface
docstring_tokens: Intialize the translator instance if necessary .