When a user uploads files which is larger than the allowed size he gets a error-message in english and not the language which I set in faces-config.xml
There are any special settings needed to display the error-message in the right language? The other error messages for example on the field I set to required="true" are correct. Also my own messages which I set in Messages_de.properties are working.
Error Message
Invalid file sizeDSC_6773.JPG 2.9 MB
faces-config.xml:
<locale-config>
<default-locale>de</default-locale>
<supported-locale>de</supported-locale>
</locale-config>
<message-bundle>
jsfmessages.Messages_de
</message-bundle>
Messages_de.properties:
javax.faces.component.UIInput.REQUIRED=bitte ausf\u00fcllen
page.xhtml:
<p:fileUpload fileUploadListener="#{eintrag.handleFileUpload}"
mode="advanced" update="msgFileUpload" auto="true"
sizeLimit="#{config.fileUploadMaxSize}"
allowTypes="/(\.|\/)(jpeg|jpg|png)$/" label="Auswählen"
disable="false" id="fileUpload" />
In fileUpload tag you can add message (in your language) about invalid file size in invalidSizeMessage attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With