Guest User

Untitled

a guest
Jun 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <?php
  2.  
  3. class LanguageSelector extends Zend_Controller_Plugin_Abstract
  4. {
  5.  
  6. public function preDispatch(Zend_Controller_Request_Abstract $request)
  7. {
  8.  
  9. $registry = Zend_Registry::getInstance();
  10. $translate = $registry->get('Zend_Translate');
  11. $session = new Zend_Session_Namespace('session');
  12. $lang = $request->getParam('lang','');
  13.  
  14. // read the session for language
  15. $translate->setLocale('ch_CH');
  16. //$this->getResponse()->appendBody(Zend_Debug::dump($session)) ;
  17.  
  18. }
  19.  
  20.  
  21. public function routeStartup(Zend_Controller_Request_Abstract $request)
  22. {
  23. }
  24.  
  25. public function routeShutdown(Zend_Controller_Request_Abstract $request)
  26. {
  27. }
  28.  
  29. public function dispatchLoopStartup( Zend_Controller_Request_Abstract $request)
  30. {
  31. }
  32.  
  33. public function postDispatch(Zend_Controller_Request_Abstract $request)
  34. {
  35. }
  36.  
  37. public function dispatchLoopShutdown()
  38. {
  39. }
  40.  
  41. }
  42.  
  43.  
  44. ?>
Add Comment
Please, Sign In to add comment