- From: Marcos Caceres <w3c@marcosc.com>
- Date: Wed, 13 Mar 2013 07:19:15 +0000
- To: Ming Jin <ming79.jin@samsung.com>
- Cc: sysapps <public-sysapps@w3.org>
On Wednesday, 13 March 2013 at 06:02, Ming Jin wrote: > > -----Original Message----- > > From: Marcos Caceres [mailto:w3c@marcosc.com] > > Sent: Tuesday, March 12, 2013 2:12 AM > > To: sysapps > > Subject: Manifest internationalization Model > > > > > * The application locale should be exposed in JS through an interface. > > In addition to that, we may need a "language change" system event defined somewhere to allow web app contents to perform l10n operations. Agreed. At least giving the author a chance to respond to regional changes would be a good thing. > > > # W3C Packaged Web Apps (widgets) 18n Model. > > The model is already fully described [3] - with plenty of examples. It > > supports both manifest level localizations as all directory-based > > localisation in a manner similar to Google's. > > > I think the "directory-based" l10n model of W3C P&C is different from Google Chrome's: while W3C P&C requires to have the localized *files* (such as index.html, icon.png, etc.) in each localized directory, Chrome i18n model requires to put the localized "messages* (via messages.json) in each localized directory. You are correct. My characterisation was an oversimplification. I just meant that they both use a special folder with language tags to do the matching. The W3C P&C is more flexible and powerful (IMO) in that it allows for full localisation of media, not just strings. > The former might require to reload the localized html page upon language change, while the latter provides an opportunity for doing localization without reloading (with the help of "language change" event and i18n API, or sort of). I'd based my research on the following sources, but I can't find any mention of the event: https://developer.chrome.com/extensions/i18n.html https://developers.google.com/chrome/web-store/docs/i18n Do you have a pointer to the even? > If possible, the system language change should not trigger the reloading of a page, which may result a loss of temporary user data (such as form data). Agreed.
Received on Wednesday, 13 March 2013 07:19:50 UTC