code: public function getMessageFormatter()
      {
          if ($this->_messageFormatter === null) {
              $this->_messageFormatter = new MessageFormatter();
          } elseif (is_array($this->_messageFormatter) || is_string($this->_messageFormatter)) {
              $this->_messageFormatter = Yii::createObject($this->_messageFormatter);
          }
  
          return $this->_messageFormatter;
      }
docs: Returns the message formatter instance.
  @return MessageFormatter the message formatter to be used to format message via ICU message format.