[whatwg] Review of the 3.16 section and the HTMLInputElement interface

This issue seems to be a very recurring and still unsolved problem when
dealing with Web internationalization / multi-language Web Apps.
I would like to suggest this to be reviewed with an editor comment please.

Additionally, it's important if we could decorate separately the file path
text field and the browse button using CSS.

Best reagards,
Samuel Santos


On Mon, Feb 11, 2008 at 12:11 AM, Samuel Santos <samaxes at gmail.com> wrote:

> I've already tried to comment on this issue [1] but I think I haven't
> achieve to make my point clear.
>
> When developing a web application I can't usually rely on the languages
> configured on the user browser (sent through the Accept-Language).
> 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.
> 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.
>
> This is a problem for the input element with type="file". 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.
>
> 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:
> interface HTMLInputElement : HTMLElement {
>            attribute DOMString       defaultValue;
>            attribute boolean         defaultChecked;
>   readonly attribute HTMLFormElement form;
>            attribute DOMString       accept;
>            attribute DOMString       accessKey;
>            attribute DOMString       align;
>            attribute DOMString       alt;
>            attribute boolean         checked;
>            attribute boolean         disabled;
>            attribute long            maxLength;
>            attribute DOMString       name;
>            attribute boolean         readOnly;
>            attribute unsigned long   size;
>            attribute DOMString       src;
>            attribute long            tabIndex;
>            attribute DOMString       type;
>            attribute DOMString       useMap;
>            attribute DOMString       value;
>   void               blur();
>   void               focus();
>   void               select();
>   void               click();
>
>   // new in this specification:
>   readonly attribute NodeList        forms;
>            attribute DOMString       min;
>            attribute DOMString       max;
>            attribute DOMString       step;
>            attribute DOMString       pattern;
>            attribute boolean         required;
>            attribute boolean         autocomplete;
>            attribute boolean         autofocus;
>            attribute DOMString       inputmode;
>            attribute DOMString       action;
>            attribute DOMString       enctype;
>            attribute DOMString       method;
>            attribute DOMString       target;
>            attribute DOMString       replace;
>   readonly attribute HTMLElement     list;
>   readonly attribute HTMLOptionElement selectedOption;
>   readonly attribute RepetitionElement htmlTemplate;
>   readonly attribute HTMLCollection  labels;
>
>            attribute DOMTimeStamp    valueAsDate;
>            attribute float           valueAsNumber;
>
>   void stepUp(in int n);
>   void stepDown(in int n);
>
>   readonly attribute boolean         willValidate;
>   readonly attribute ValidityState   validity;
>   readonly attribute DOMString       validationMessage;
>   boolean            checkValidity();
>   void               setCustomValidity(in DOMString error);
>   void               dispatchChange();
>   void               dispatchFormChange();
> };
>
> What I propose is to add a new attribute to the input element like this:
>            attribute DOMString       browseText;
> 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.
>
> [1] http://lists.w3.org/Archives/Public/public-html/2008Jan/0104.html
> [2] http://www.whatwg.org/specs/web-forms/current-work/#dom
>
> --
> Samuel Santos
> http://samaxes.com/




-- 
Samuel Santos
http://www.samaxes.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080514/195f4390/attachment.htm>

Received on Wednesday, 14 May 2008 09:38:11 UTC