From: <pan...@us...> - 2008-09-25 11:13:21
|
Revision: 386 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=386&view=rev Author: panzaboi Date: 2008-09-25 11:13:19 +0000 (Thu, 25 Sep 2008) Log Message: ----------- message + translate Modified Paths: -------------- website/library/Ostacium/Controller/Action.php Modified: website/library/Ostacium/Controller/Action.php =================================================================== --- website/library/Ostacium/Controller/Action.php 2008-09-25 11:12:39 UTC (rev 385) +++ website/library/Ostacium/Controller/Action.php 2008-09-25 11:13:19 UTC (rev 386) @@ -3,10 +3,13 @@ class Ostacium_Controller_Action extends Zend_Controller_Action { protected $_model; + protected $_translate; public function init() { - $name = ucfirst($this->getRequest()->getControllerName()); + $this->_translate = Zend_Registry::get('Zend_Translate'); + + $name = ucfirst($this->getRequest()->getControllerName()); // Setup LayoutPath $layoutPath = $this->_helper->getHelper('viewRenderer')->getModuleDirectory() . DIRECTORY_SEPARATOR . 'layouts'; @@ -58,7 +61,19 @@ $to = str_replace('-', '/', $to); return $this->_redirect($to); } + + $this->view->placeholder('message')->set($this->view->message); } + + protected function translate($msg) + { + return $this->_translate->_($msg); + } + + protected function _($msg) + { + return $this->_translate->_($msg); + } } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |