Issues

ZF-8526: Zend_Form_Element_File label is not translated

Description

Reopening #ZF-8247 (http://framework.zend.com/issues/browse/ZF-8247)

Zend_Form_Element_File label is not translated when the form element is rendered separately.

example:


// controller
$form = new Zend_Form();
// setup translator
...
// configure elements
$form->setEnctype('multipart/form-data');
$form->addElement('file', 'myFile', array('label' => 'fileLabel', 'required' => false));
$form->addElement('text', 'myText', array('label' => 'textLabel', 'required' => false));
$form->addElement('submit', 'mySubmit', array('label' => 'submitLabel'));
$this->view->form = $form;

// view
<?= $this->form->renderForm(false) ?>
<?= $this->form->myFile ?>
<?= $this->form->myText ?>
<?= $this->form->mySubmit ?>

"textLabel" and "submitLabel" are correctly translated, "fileLabel" is not translated.

If the form is rendered in such a way:


// view
<?= $form ?>

then all labels are translated correctly.

Comments

Is this still an issue with 1.10.2? If yes, please provide the part setup translator in your test.

It is fixed, you can close this issue. Thank you

Not an Issue any longer.