I have this controller which will simply change the language in a session so I can set it in the bootstrap.
Except I want to change '$this->_redirect ( 'library/recipes/list' );' to be the URL of the page they are on. Ive tried a few functions and they dont seem to work.
Im a newbie Zend user, thanks!
class Library_LanguageswitchController extends Zend_Controller_Action {
public function init() {
$this->_helper->layout->disableLayout ();
$this->_helper->viewRenderer->setNoRender ();
}
public function switchAction() {
$session = new Zend_Session_Namespace ( 'whatcould' );
$session->language = $this->_getParam ( 'lang' );
$this->_redirect ( 'library/recipes/list' );
}
}