Issue
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.
Solution
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”
?
Answered By - Michał Rybak
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)