예제 #1
0
 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'));
     }
 }
예제 #2
0
 /**
  * (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;
 }