Closed rarog closed 4 years ago
If this way is wrong and you want to stick to phtml, another way in _form.phtml is possible, though it would still be somewhat hackish:
<?php foreach ($form as $element): ?> <?php $messages = $element->getMessages(); if (is_array($messages)) { foreach ($messages as $key => $val) { $messages[$key] = $this->translate($val); } $element->setMessages($messages); } ?>
If this isn't the intended way of translation, this should be changed nevertheless, as it is of now, the translation is omitted.