Reputation: 196
<input type="file" .../>
I understand this will always show as |choose file| no file selected.(chrome) / Browse... (I.E 9 / Firefox)
I wanted to ask if the text "Choose File/ Browse" will change dependent to the users localisation.
As by default it shows as "Choose File", but someone viewing in 'fr/FR' would they see "Choose File" or "choisir le fichier"
Or is it possible to localize the text of the button to "Select" so it shows the same across all browsers and that way i can localize the string?
Upvotes: 2
Views: 429
Reputation: 196
I believe having the region and language set up in a specific language will default the the "browse"/"choose file" to the local language. Where as if set region is English, but have keyboard for french for example, will not make any difference as the display language is still English.
This is mainly due to the reason of security risk, but there are work around for it using pure Javascript/ JQuery.
Upvotes: 0
Reputation: 2539
My firefox is in english, but my never used IE says "Parcourir..." on an input "file" button... so it seems localized.
Edit : you can test it yourself by changing the language of your navigator (Options>Content>Language in firefox). Edit 2 : (above only change the language requested to servers not the firefox one) to change firefox language : install the xpi for the language (search there : http://releases.mozilla.org/pub/mozilla.org/firefox/releases/) then in a tab "about:config" you can change the "general.useragent.locale" parameter to the wanted language).
Upvotes: 1