Manage extension updates by localeFrom MozillaZine Knowledge BaseThis page is part of the extension development documentation project. Ask your questions in MozillaZine Forums. Also try browsing example code. Note: development documentation is in process of being moved to Mozilla Development Center (MDC). The content of this article is a partial workaround to the Firefox bug 285848 The purpose of this is to be able to provide updates only for selected locales users (e.g. only for the users of the fr-FR or so), useful if you don't want to delay the release of a new version because of the l10n time or if the translator want to correct an error in the translation. It's also a way to get usage statistics by locale. The result is the possibility to get one update.rdf file per locale. You need to use a special preference key to override the update check url specified in your install.rdf file. The name of this preference key is " Below are instructions on how to modify this preference key. These instructions require knowledge of how to use the default preferences file in your extension package. [edit] Instructions
[edit] ExampleIf all goes well, your preferences file (defaults\preferences\prefs.js) may look like this: pref("extensions.{abcdef01-1234-abcd-1234-012345abcdef}.update.url", "chrome://my_ext/locale/names.properties");
And your localized properties file (chrome://my_ext/locale/names.properties) may look like this: extensions.{abcdef01-1234-abcd-1234-012345abcdef}.update.url = http://www.mysite.com/updates/my_ext-locale.rdf
where "locale" is the locale code (e.g. en-US).
|
|