sysapps / runtime

Runtime and Security Model for Hosted Web Applications and Packaged Applications
6 stars 13 forks source link

Notification of change to navigator.language #14

Open marcoscaceres opened 11 years ago

marcoscaceres commented 11 years ago

This is a duplicate of: https://www.w3.org/Bugs/Public/show_bug.cgi?id=21289 (Filing this with our group also, in case it's rejected by the WHATWG and we still want it)

Users sometimes need to switch locale settings on their device. When this happens, the value of navigator.language is changed (or should be!). It would be nice if HTML provided some means to be notified that the change had taken place.

The application can then use this information to perform appropriate localization changes on the client side. For example, reformatting DOM elements that contain times and dates to better suit the new locale information (this could work together with the ECMAScript i18n API).

mounirlamouri commented 11 years ago

There were some ideas to push a Web l10n specification that would add a 'locale-change' event (or something similar) fired to the document object. I am not sure how such a specification would be followed though.

marcoscaceres commented 11 years ago

Do you have any details of who was making the proposal and where?

mounirlamouri commented 11 years ago

For bookkeeping, webl10n repo is there: https://github.com/fabi1cazenave/webL10n