ZF2-314: setDefaultTranslator() method not exist

Issue Type: Bug Created: 2012-05-25T08:07:38.000+0000 Last Updated: 2012-05-30T09:32:53.000+0000 Status: Resolved Fix version(s): Reporter: Sina Miandashti (placebo) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Form

  • translation
  • zend-form

Related issues: Attachments:



i updated the lib to zf2 b4

there is no setDefaultTranslator anymore

how can i inject the translator to zend form ?


Posted by Frank Br├╝ckner (frosch) on 2012-05-25T10:02:01.000+0000

Do we really need a translator object in a form? I think the right place would be the view layer.

Posted by Matthew Weier O'Phinney (matthew) on 2012-05-27T21:55:29.000+0000

Zend\Form was completely re-written for beta4. There is no translation awareness, as the Form component is simply a bridge between model (specifically, filtering, via the new InputFilter component) and view. If you need to translate labels or other form-related output, this should be done in the view layer. We could potentially make the various form view helpers translation aware for this purpose -- but, again, this would be in the view layer, not in the Form component itself.

Posted by Paulo Assis (assisp) on 2012-05-30T09:32:53.000+0000

Hi, I've solved this (for the error messages) with: \Zend\Validator\AbstractValidator::setDefaultTranslator($translator);

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.