public function translate($bundle, $message, $arguments = array()) { $session = HttpSession::getSession(); if (!$session->hasAttribute('LANGUAGE')) { return $this->messageSource->getMessage($bundle, $message, $arguments); } else { return $this->messageSource->getMessage($bundle, $message, $arguments, $session->getAttribute('LANGUAGE')); } }
/** * (non-PHPdoc) * @see Ding\MessageSource.IMessageSource::getMessage() */ public function getMessage($bundle, $message, array $arguments, $locale = 'default') { return $this->_messageSource !== false ? $this->_messageSource->getMessage($bundle, $message, $arguments, $locale) : NULL; }