On Wed, Feb 9, 2011 at 5:50 PM, Phillips, Addison <[email protected]> wrote: > Dear Marcos, > > [this is a reply on behalf of the Internationalization Core WG] > > We agree that not providing a default locale for a Widget is an oversight in > the Widget's localization model. The ability to provide multiple languages in > the configuration file or in the locales directory structure does not provide > the Widget container with a clear choice when the runtime language is not one > of the languages provided. > > Part of this oversight may be due to an expectation that there would be a > "default" set of resources present in the Widget. For example, if you had a > structure like this: > > Foo.html > /locales > /de-DE > Foo.html > > ... then if the top "Foo.html" is the start file, it is the default and > "/locales/de-DE/Foo.html" represents a German appropriate resource > corresponding to that same file. The language of the top-level resource can > be anything and can be defined using the usual attributes. However, there is > no requirement that such content be provided nor that it be in any particular > language. > > This does not, as you point out, work with items defined in the config.xml > file itself. > > In practice, most resource systems require that the "base" or "root" locale's > resources be present to guarantee full functionality. The description in > Widget's P&C implies this. It should state it explicitly and/or provide a > mechanism for specifying the default. > > The attribute 'defaultlocale' that you propose makes sense as a means of > doing this. The alternative is to overload xml:lang="", but this has a number > of negative things associated with it--such as the fact that it prevents the > format from indicating what language the default is. > > Finally, on a separate topic, we want to note that there is significant > progress on internationalization additions to ECMAScript going on currently, > which will be of great benefit to widget writers interested in > internationalization and which may be of interest to Webapps WG as a result. >
This is now in the spec, and implemented by Opera. It should ship in our upcoming release of Opera Desktop 11.10 in the near future. -- Marcos Caceres Opera Software ASA, http://www.opera.com/ http://datadriven.com.au
