Reputation: 1799
How can I get non-translated label in class Label extends \Zend_Form_Decorator_Label
?
When I tried to get it like "$this->getLabel()
" it is already translated in russian.
Upvotes: 1
Views: 128
Reputation: 69967
Prior to calling $this->getLabel()
, you can disable the translator flag on the element by calling $element->setDisableTranslator(true)
which will disable translation of that element.
Then, when you call getLabel()
it checks to see if the translator for that element is enabled; if enabled, the label is translated and then returned, otherwise it is returned without translation like you want.
Upvotes: 1