<a id="webex"></a>

# WebExtension JSON

File format used when translating extensions for Mozilla Firefox or Google Chromium.

#### NOTE
While this format is called JSON, its specification allows including
«//»-style comments. Weblate does strip these comments while parsing the
files and discards them when saving.

#### SEE ALSO
* [JSON](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/json.html)
* [Google chrome.i18n](https://developer.chrome.com/docs/extensions/reference/api/i18n)
* [Mozilla Extensions Internationalization](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Internationalization)

Example file:

```json
{
  "hello": {
    "message": "Ahoj světe!\n",
    "description": "Description",
    "placeholders": {
      "url": {
        "content": "$1",
        "example": "https://developer.mozilla.org"
      }
    }
  },
  "orangutan": {
    "message": "Orangutan has $coUnT$ bananas",
    "description": "Description",
    "placeholders": {
      "count": {
        "content": "$1",
        "example": "5"
      }
    }
  },
  "try": {
    "message": "",
    "description": "Description"
  },
  "thanks": {
    "message": "",
    "description": "Description"
  }
}
```

<!-- AUTOGENERATED START: format-features webextension -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Supported features

| File extensions                                                                                      | `.json`        |
|------------------------------------------------------------------------------------------------------|----------------|
| Linguality [ⓘ](https://docs.weblate.org/no/latest/formats.md#bimono)                                   | Monolingual    |
| Supports plural [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-plurals)                      | `Yes`          |
| Supports descriptions [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-description)            | `Yes`          |
| Supports explanation [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-explanation)             | `No`           |
| Supports context [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-context)                     | `No`           |
| Supports location [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-location)                   | `No`           |
| Supports flags [ⓘ](https://docs.weblate.org/no/latest/formats.md#format-flags)                         | `No`           |
| API identifier                                                                                       | `webextension` |
| Supports read-only strings [ⓘ](https://docs.weblate.org/no/latest/formats.md#read-only-strings)        | `No`           |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/no/latest/formats.md#obsolete-strings) | `No`           |
<!-- AUTOGENERATED END: format-features webextension -->

## Weblate configuration

|                                | Typical Weblate [Component configuration](https://docs.weblate.org/no/latest/admin/projects.md#component)   |
|--------------------------------|----------------------------------------------------------------------------------------------------|
| File mask                      | `_locales/*/messages.json`                                                                         |
| Monolingual base language file | `_locales/en/messages.json`                                                                        |
| Template for new translations  | Empty                                                                                              |
| File format                    | WebExtension JSON file                                                                             |
