ZF2-314: setDefaultTranslator() method not exist



i updated the lib to zf2 b4

there is no setDefaultTranslator anymore

how can i inject the translator to zend form ?


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

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.

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