Reputation: 363
HTML form input type = file is providing "Browse" and "No file Selected" in firefox and "choose File" and "No File Chosen" in chrome to choose a file.
I have a use case to translate "Browse" and "Choose File" as per browser language.
is it possible to do without adding any javascript library?
Thanks in advance
Upvotes: 3
Views: 10133
Reputation: 22158
Native input elements are depending on the operating system and the browser that the clients are using. You can workaround with a custom file picker (an input file hidden, a layer that triggers the hidden input file, the text that you like).
You can use this refferences:
How to style "input file" with CSS3 / Javascript?
http://markusslima.github.io/jquery-filestyle/
http://moro.es/projects/jquery-nicefileinput-js/
Good luck!
Upvotes: 1