original_string: public function translate($message, array $params = array())
      {
          // Update the current message with the domain translation, if we have one.
          if (isset($this->messages[$message]) && ! empty($this->messages[$message])) {
              $message = $this->messages[$message];
          }
  
          if (empty($params)) {
              return $message;
          }
  
          $formatter = new MessageFormatter();
  
          return $formatter->format($message, $params, $this->locale);
      }
code: public function translate($message, array $params = array())
      {
          // Update the current message with the domain translation, if we have one.
          if (isset($this->messages[$message]) && ! empty($this->messages[$message])) {
              $message = $this->messages[$message];
          }
  
          if (empty($params)) {
              return $message;
          }
  
          $formatter = new MessageFormatter();
  
          return $formatter->format($message, $params, $this->locale);
      }
code_tokens: public function translate ( $ message , array $ params = array ( ) ) { // Update the current message with the domain translation, if we have one. if ( isset ( $ this -> messages [ $ message ] ) && ! empty ( $ this -> messages [ $ message ] ) ) { $ message = $ this -> messages [ $ message ] ; } if ( empty ( $ params ) ) { return $ message ; } $ formatter = new MessageFormatter ( ) ; return $ formatter -> format ( $ message , $ params , $ this -> locale ) ; }
docstring: Translate a message with optional formatting
  @param string $message Original message.
  @param array $params Optional params for formatting.
  @return string
docstring_tokens: Translate a message with optional formatting