I´m using for my app spring-mvc and I have managed go up file to server, with label: <form:input path="file" type="file" id="file"/>
, but I have a problem when my app changes of language, because this input type=file
doesn´t change of language and I´m doing a lot of proof but I don´t get it.
does somebody know like it doing?
for to change the language of all labels, I do this:<fmt:message key="device.registerFormFile"/>
Thanks.
Definition and Usage. The <input type="file"> defines a file-select field and a "Browse" button for file uploads. To define a file-select field that allows multiple files to be selected, add the multiple attribute. Tip: Always add the <label> tag for best accessibility practices!
The value property returns the path or the name of the file selected with the <input type="file"> element. This property returns the name of the selected file with a fake path in IE, Google Chrome, and Opera, and the name of the selected file in Firefox and Safari.
Unfortunately, it is not possible to change the "Choose File" and "No File Chosen", since we use a standard file input element for single upload fields. That element is not controlled by us, it is a native browser element, so it even looks different on each browsers.
It's not possible to translate "Choose file" and "no file chosen" labels, as those are native browser elements and depend on browser's language.
However, you may try some tricks like putting image instead of button or making file input transparent (and add text input below).
Browse through those answers to choose if any is suitable:
How to change the button text of <input type=“file” />
?
Change default text in input type=“file”
?
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