ZF-Commons / ZfcUser

A generic user registration and authentication module for ZF2. Supports Zend\Db and Doctrine2. (Formerly EdpUser)
BSD 3-Clause "New" or "Revised" License
497 stars 343 forks source link

failedLoginMessage should be translated, too. #647

Closed rarog closed 4 years ago

rarog commented 8 years ago

If this isn't the intended way of translation, this should be changed nevertheless, as it is of now, the translation is omitted.

rarog commented 8 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); } ?>