Closed MarshMalloW0007 closed 5 years ago
@MarshMalloW0007
The current result is correct because the constants UploadFile::INVALID
and UploadFile::IS_EMPTY
do not exist.
Hello Froschdesign,
That's right. At first, I tried to modify the messages in my Form file but only the message 'No file was uploaded' remained in English. Then I modified my Module.php to include a general translation. Again, everything is translated except 'No file was uploaded'. For the issue, I tried quickly to recreate my initial Form, with the error you raised :-)
I attach a screenshot of my web form and my Module.php
FYI, I'm using ZF3.
Module.php.txt
@MarshMalloW0007
At first, I tried to modify the messages in my Form…
This means you must use the existing constants of the class Zend\Validator\File\Upload
and not any constants.
Again, everything is translated except 'No file was uploaded'.
I think this is a problem in the translation files of zend-i18n-resources because the message is different between the validator and the translation file.
As workaround you can set the message with the correct constants for your input-filter.
To solve the problem, we must write a script to check all message identifiers in the translation files. This must be done at https://github.com/zendframework/zend-i18n-resources
Thanks for reporting!
Does not work and always gives the message "No file was uploaded"
I modified my code to have a general translation of my module: module.php
Does not work and always gives the message "No file was uploaded". For my other validators, everything works (I have not yet tested all the validators ... :-)
Best regards