Disable translation for special controllers

426 Views Asked by At

is there any possibility to disable the language translator for a controller? This example controller only delivers images.

$this->_helper->layout->disableLayout();
$this->_helper->translator ???

TIA Matt

1

There are 1 best solutions below

3
On BEST ANSWER

If you initialize the translator in bootstrap by including it in the Zend Registry, maybe you could just unset the Zend_Translate entry in it from the init() method of the controller, which is called after the bootstrap.

Unsetting a single value in the Zend_Registry is not so trivial. In short, you need to do something like this:

$registry = Zend_Registry::getInstance();
unset($registry['Zend_Translate']); 

Hope that helps,