original_string: public function translate($translationId, $args = array(), $language = null)
      {
          $args = is_array($args) ? $args : array($args);
  
          if (strpos($translationId, "_") !== false) {
              list($plugin, $key) = explode("_", $translationId, 2);
              $language = is_string($language) ? $language : $this->currentLanguage;
  
              $translationId = $this->getTranslation($translationId, $language, $plugin, $key);
          }
  
          if (count($args) == 0) {
              return str_replace('%%', '%', $translationId);
          }
          return vsprintf($translationId, $args);
      }
code: public function translate($translationId, $args = array(), $language = null)
      {
          $args = is_array($args) ? $args : array($args);
  
          if (strpos($translationId, "_") !== false) {
              list($plugin, $key) = explode("_", $translationId, 2);
              $language = is_string($language) ? $language : $this->currentLanguage;
  
              $translationId = $this->getTranslation($translationId, $language, $plugin, $key);
          }
  
          if (count($args) == 0) {
              return str_replace('%%', '%', $translationId);
          }
          return vsprintf($translationId, $args);
      }
code_tokens: public function translate ( $ translationId , $ args = array ( ) , $ language = null ) { $ args = is_array ( $ args ) ? $ args : array ( $ args ) ; if ( strpos ( $ translationId , "_" ) !== false ) { list ( $ plugin , $ key ) = explode ( "_" , $ translationId , 2 ) ; $ language = is_string ( $ language ) ? $ language : $ this -> currentLanguage ; $ translationId = $ this -> getTranslation ( $ translationId , $ language , $ plugin , $ key ) ; } if ( count ( $ args ) == 0 ) { return str_replace ( '%%' , '%' , $ translationId ) ; } return vsprintf ( $ translationId , $ args ) ; }
docstring: Returns an internationalized string using a translation ID. If a translation
  cannot be found for the ID, the ID is returned.
  
  @param string $translationId Translation ID, eg, `General_Date`.
  @param array|string|int $args `sprintf` arguments to be applied to the internationalized
  string.
  @param string|null $language Optionally force the language.
  @return string The translated string or `$translationId`.
  @api
docstring_tokens: Returns an internationalized string using a translation ID . If a translation cannot be found for the ID the ID is returned .