Forms and I18n view helpers #5826

Closed
Martin-P opened this Issue Feb 13, 2014 · 2 comments

Projects

None yet

4 participants

@Martin-P
Contributor

In #2865 was mentioned that translating form elements needs some terrible code like:

$this->formRow()->setTranslatorTextDomain('my-textdomain');
$this->formElementErrors()->setTranslatorTextDomain('my-textdomain');
$this->formButton()->setTranslatorTextDomain('my-textdomain');

Having to use setTranslatorTextDomain on each view helper is not really a user friendly way of working with translations. Besides that, there is no inheritance. When I set the text domain only on the formRow view helper, the label gets translated inside the formRow view helper with the correct text domain, but the form element errors get translated outside the formRow view helper without the text domain.

In #2865 @DASPRiD mentioned a WIP, but that has come to a halt? Or am I looking at the wrong code? https://github.com/DASPRiD/zf2/compare/feature;textdomain-stack

It would be very welcome to make it much easier to set the translator text domain once for all form view helpers and not having to set the translator text domain for every single view helper.

@Ocramius Ocramius added Form I18n labels Apr 3, 2014
@samsonasik
Contributor

ping @DASPRiD any update for that WIP ?

@GeeH GeeH added the To Be Closed label Mar 5, 2016
@GeeH
GeeH commented Jun 27, 2016

This issue has been closed as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html

@GeeH GeeH closed this Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment