Are you looking for something like following found on https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization ? :
Retrieving localized strings in manifests
Your manifest.json includes strings that are displayed to the user, such as the extension’s name and description. If you internationalize these strings and put the appropriate translations of them in messages.json, then the correct translation of the string will be displayed to the user, based on the current locale, like so.
To internationalize strings, specify them like this:
Here, we are retrieving message strings dependant on the browser’s locale, rather than just including static strings.
To call a message string like this, you need to specify it like this:
- Two underscores, followed by
- The string “MSG”, followed by
- One underscore, followed by
- The name of the message you want to call as defined in
messages.json , followed by
- Two underscores
__MSG_ + messageName + __