W3C home > Mailing lists > Public > public-i18n-core@w3.org > October to December 2010

RE: Comment on Widget Interface...

From: Phillips, Addison <addison@lab126.com>
Date: Thu, 14 Oct 2010 11:58:27 -0400
To: Arthur Barstow <art.barstow@nokia.com>, "marcosc@opera.com" <marcosc@opera.com>, "public-i18n-core@w3.org" <public-i18n-core@w3.org>
CC: public-webapps <public-webapps@w3.org>
Message-ID: <C7A5719F1E562149BA9171F58BEE2CA412A18B7A71@EX-IAD6-B.ant.amazon.com>
Hello Art, Marcos, and Webapps,

During our teleconference yesterday [1], I was tasked with formally replying to this request on behalf of the Internationalization WG. 

I would still like to see the 'locale' field restored to the interface. It's important to be able to query which locale the widget is running in (especially in the face of upcoming ECMAScript internationalization changes) so that the caller can match it if necessary.

I agree with Marcos's approach to returning the @lang. Marcos concluded with this comment:

> >
> > 3. At runtime, upon getting an attribute from the Widget object
> (e.g.,
> > widget.name), you need to display that properly. The case is:
> >
> > $("#somePElement).innerHTML = widget.name; //in Arabic
> >
> > To display it properly, we need something like the algorithm
> described in:
> > http://www.iamcal.com/understanding-bidirectional-text/


Most user-agents have implemented the Unicode Bidirectional Algorithm (which is what Cal is describing), so that isn't the issue, so much as the fact that sometimes the algorithm needs a little help. The problem is that the base direction of a string is sometimes necessary to get the correct behavior from strings. 

For excellent illustrations of this, see [2]. 

Using Unicode Bidi control characters is one way to manage this, but in a markup context, the 'dir' attribute is really preferable. If you're going to create LocalizedString, it should have both a lang and dir attribute that can be queried. Having @dir in P&C will help the Widget engine display the string properly too.

I look forward to seeing the resulting spec published. Please let me know if you need any assistance from me in making progress.

Thanks,

Addison

[1] http://www.w3.org/2010/10/13-i18n-minutes.html

[2] http://www.w3.org/International/articles/inline-bidi-markup/ 

Addison Phillips
Globalization Architect (Lab126)
Chair (W3C I18N, IETF IRI WGs)

Internationalization is not a feature.
It is an architecture.

Received on Thursday, 14 October 2010 15:59:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 14 October 2010 15:59:07 GMT