ZF-6150: Zend_Form_Element_FormImage::setDisableTranslator() does not work
This is true for the current version in svn (1.7.7 ?). It may be true for all form elements, but I did not test that yet. If I can find the time I will do more tests.
//in a custom form, descendant of ZendX_JQuery_Form $new = $this->createElement('image', 'new', array('value' => 'new', 'class' => 'button_new', 'title' => 'New', 'disableTranslator' => 'true',// does work )); $new->setDisableTranslator(true);// @todo: does not work, file an issue $new->setImage(BASEURL . '/images/icons/new.png'); $this->addElement($new);
In the above snippet, setting the option 'disableTranslator' to true will have the desired effect, while using the function setDisableTranslator has no effect.
One might argue that there is nothing about the FormImage element that has to be translated, but as you can see I am adding the 'title' attribute in the options and I want that to be translated. I know, from the documentation and from the code, that the 'title' attribute will not be translated by design. Therefore I will create a parallel issue of type improvement, to have the title attribute translated.
While I am testing and trying to find a solution to get the title attribute translated (to be able to create translatable tooltips on buttons), I find that this issue does not apply to a submit button, with a submit button setDisableTranslator() works.