I've already tried to comment on this issue [1] but I think I haven't achieve to make my point clear.<br><br>When developing a web application I can't usually rely on the languages configured on the user browser (sent through the <span style="font-family: courier new,monospace;">Accept-Language</span>).<br>
Often I need to send e-mail or sms notifications and I need to know the user preferred language, so I need to have it saved on the user profile on the database.<br>The same applies to the application web interface. Not all the users want the default language of the application to be english, but few of them configure the languages in their browser. That causes the user to have a different language configured in their application's profile and in the browser. In summary, what I mean is that I can only trust the language the user has chosen in his profile and not in the language send by the browser.<br>
<br>This is a problem for the <span style="font-family: courier new,monospace;">input</span> element with <span style="font-family: courier new,monospace;">type="file"</span>. If the language selected in his profile is, e.g. portuguese, and the language in the browser is english (the default), he will see all the application in portuguese and the input file browse button text value will be in english.<br>
<br>In the section 7. Extensions to the HTML Level 2 DOM interfaces [2] of the Web Forms 2.0 specification the HTMLInputElement interface is defined like this:<br><span style="font-family: courier new,monospace;">interface HTMLInputElement : HTMLElement {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString defaultValue;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute boolean defaultChecked;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> readonly attribute HTMLFormElement form;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString accept;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString accessKey;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString align;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString alt;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute boolean checked;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute boolean disabled;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute long maxLength;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString name;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute boolean readOnly;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute unsigned long size;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString src;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute long tabIndex;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString type;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString useMap;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString value;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> void blur();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> void focus();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> void select();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> void click();</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // new in this specification:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> readonly attribute NodeList forms;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString min;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString max;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString step;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString pattern;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute boolean required;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute boolean autocomplete;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute boolean autofocus;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString inputmode;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString action;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString enctype;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString method;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMString target;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute DOMString replace;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> readonly attribute HTMLElement list;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> readonly attribute HTMLOptionElement selectedOption;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> readonly attribute RepetitionElement htmlTemplate;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> readonly attribute HTMLCollection labels;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> attribute DOMTimeStamp valueAsDate;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> attribute float valueAsNumber;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> void stepUp(in int n);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> void stepDown(in int n);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> readonly attribute boolean willValidate;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> readonly attribute ValidityState validity;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> readonly attribute DOMString validationMessage;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> boolean checkValidity();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> void setCustomValidity(in DOMString error);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> void dispatchChange();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> void dispatchFormChange();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">};</span><br><br>What I propose is to add a new attribute to the input element like this:<br><span style="font-family: courier new,monospace;"> attribute DOMString browseText;</span><br>
this allows us developers to change the input file browse button text to have it in the same language as the rest of the application and not with the language selected in the browser.<br clear="all"><br>[1] <a href="http://lists.w3.org/Archives/Public/public-html/2008Jan/0104.html">http://lists.w3.org/Archives/Public/public-html/2008Jan/0104.html</a><br>
[2] <a href="http://www.whatwg.org/specs/web-forms/current-work/#dom">http://www.whatwg.org/specs/web-forms/current-work/#dom</a><br><br>-- <br>Samuel Santos<br><a href="http://samaxes.com/">http://samaxes.com/</a>