How to localize the name and description of the Firefox SDK add-in?

I am developing an add-on for Firefox, and now I want to localize the name and description of the add-in itself, as visible to the user in the add-in manager menu.

However, the guides I saw on the Internet seem to mention the settings in package.json and nothing about the add-in name or its description. I tried to apply suggestions for preferences to the name / description fields and had no success - it will always be displayed in English.

Is it possible to localize these fields?

+7
json firefox localization firefox-addon firefox-addon-sdk
source share
2 answers

There is currently no way to do this from package.json. Read error 661083 for more details.

However, there is a workaround: manually edit the install.rdf file to add the em:localized properties.

To do this, you will need to use the SDK to pack your application into an xpi file. Then open xpi (this is a zip file) and you will see install.rdf in the root of the directory.

The MDN article Localizing Extension Descriptions describes the structure that em: localized properties must have.

+4
source share

This functionality has been added to the jpm tool recently (February 2016, see question 495 ). Make sure you are using the latest version of jpm, then the following code will work in package.json :

 "title": "Default add-on name", "description": "Default add-on description", "locales": { "de": { "title": "Add-on name in German", "description": "Add-on description in German" }, "ru": { "title": "Add-on name in Russian", "description": "Add-on description in Russian" }, } 
0
source share

All Articles