禁用特殊控制器的转换
是否有可能禁用控制器的语言翻译器? 此示例控制器仅传送图像。
$this->_helper->layout->disableLayout();
$this->_helper->translator ???
TIA 马特
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您通过将翻译器包含在 Zend 注册表中来初始化 bootstrap 中的翻译器,也许您可以从控制器的
init()
方法中取消设置其中的Zend_Translate
条目,这在引导程序之后调用。取消设置
Zend_Registry
中的单个值 并不是那么微不足道。简而言之,您需要做这样的事情:希望有帮助,
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 theinit()
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:Hope that helps,