ZF-9962: Improve the way forms are translated

Issue Type: Sub-task Created: 2010-06-08T06:35:23.000+0000 Last Updated: 2013-02-13T16:01:12.000+0000 Status: Closed Fix version(s): Reporter: Eric Jeker (keilnoth) Assignee: None Tags: - Zend_Form

Related issues: Attachments:


Currently, you command the translator in form elements using setDisableTranslator() method. If you set it to true, everything is translated, if you set it to false, nothing is translated.

That's fine but have some limits.

For example, in some cases, you might need that the values are not translated, imagine a select box with people names or hours. You don't want '12:00 AM' or 'John Smith' to be translated nor you want it to figure in the not translated messages log.

So you might think that you have to disable the translator. But at that moment, you will disable the translation for the error messages, the label and everything else.

So, to hack the system, you could disable the translator only before you add the values and activate it right after that. But it seems that the values are translated at different places. For examples, Labels are translated in the decorator. In Zend_Form_Element_Multi, values are translated when you set them AND when you get them.

Anyways, it's currently impossible (as far as I know) to tell an element not to translate the values but to translate everything else and this feature could save hours to everyone and to the servers.


No comments to display

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.