ZF-2662: disableTranslator flag in Zend_Form_Element

Issue Type: Improvement Created: 2008-02-15T09:00:55.000+0000 Last Updated: 2008-03-21T16:25:49.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Adam Jensen (jazzslider) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:


Currently there is no way to specify that a particular element in a given form should NOT be translated even if a default translator instance is available in Zend_Form. As per the discussion referenced below, I am suggesting the addition of a disableTranslator flag in Zend_Form_Element which would allow automatic translation to be turned off on an element-by-element basis.

For original discussion, seeā€¦

The original discussion primarily references the option labels in select menu form fields; however, this flag should apply to other kinds of properties in other elements as well (for instance, the "description" and "label" properties).


Posted by Adam Jensen (jazzslider) on 2008-02-19T15:57:24.000+0000

Added a minor clarification to the issue description.

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-05T09:58:09.000+0000

Will need to add: * accessor, disableTranslator(), to Zend_Form_Element * logic to Zend_Form_Element::getDefaultTranslator() to not pull from Zend_Form or the current element when disableTranslator is true

Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T16:04:24.000+0000

Zend_Form, Element, and DisplayGroup all now have a 'setDisableTranslator()' method (and corresponding config key 'disableTranslator') that allows you to disable translations for that item (setting it on the form will disable for the entire form).

<pre class="highlight">


// Check the flag status:
if ($form->translatorIsDisabled()) {
    // disabled!

Committed to trunk and release branch.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.