I have created a Firefox Add-on using jpm and I have added a number of localization files such as:
- locale/da.properties
- locale/en-GB.properties
- locale/en-US.properties
- locale/fi.properties
And so on...
In my HTML files I use attributes to set these values, for example: data-l10n-id="ext_panel_heading_text".
I know the translations are working, because changes I make to values in en-GB.properties are reflected in my add-ons HTML page.
I've tried navigating to Options > Content > Choose... (under languages), removing English and adding another language (such as Finnish), however it doesn't seem to have an affect on the .properties file loaded by my extension. I also tried restarting Firefox after changing the language.
My question is: How do I test the different languages?
The only way I know is to change
general.useragent.localeto the locale you want to use (en-GB,da,en-US,fi) inabout:configand then restarting your browser: that way your add-on should show localized texts.As an alternative, you can use Quick Locale Switcher, which does the same but it's a little more friendly.