<a id="js-i18next"></a>

<a id="i18next"></a>

<a id="i18nextv4"></a>

# i18next JSON datoteke

<a id="index-0"></a>

#### Versionchanged
Promijenjeno u verziji 4.15.1: Support for v4 variant of this format was added.

#### HINT
In case you use plurals, it is recommended to use v4 as that aligned plural
handling with CLDR. Older versions have different plural rules for some
languages which are not correct.

i18next is an internationalization framework written in and for JavaScript.
Weblate supports its localization files with features such as plurals.

i18next translations are monolingual, so it is recommended to specify a base file
with (what is most often the) English strings.

## i18next JSON datoteka v4

Choose this format if unsure. It stores plurals using standard CLDR suffixes.

## i18next JSON datoteka v3

Use for legacy projects which are using numeric suffixes for plurals.

#### NOTE
The v2 and v1 variants are mostly compatible with v3, with exception of how
plurals are handled.

#### SEE ALSO
* [JSON](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/json.html)
* [https://www.i18next.com/](https://www.i18next.com/)
* [i18next JSON Format](https://www.i18next.com/misc/json-format)
* [Aktualiziranje datoteka ciljnog jezika](https://docs.weblate.org/hr/latest/devel/integration.md#updating-target-files)
* [Prilagodi JSON rezultat](https://docs.weblate.org/hr/latest/admin/addons.md#addon-weblate-json-customize)
* [Počisti prevodilačke datoteke](https://docs.weblate.org/hr/latest/admin/addons.md#addon-weblate-cleanup-generic)

Example file:

```json
{
  "hello": "Hello",
  "apple": "I have an apple",
  "apple_plural": "I have {{count}} apples",
  "apple_negative": "I have no apples"
}
```

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

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.json`                                                                                          |
|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične i dvojezične                                                                        |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `Yes`                                                                                            |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `No`                                                                                             |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                                                                                             |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `No`                                                                                             |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `No`                                                                                             |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `No`                                                                                             |
| Identifikator API-ja                                                                                       | `i18nextv4`                                                                                      |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `No`                                                                                             |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                                                                                             |
| Provjeri oznake koje je dodao ovaj format [ⓘ](https://docs.weblate.org/hr/latest/admin/checks.md#custom-checks)   | [i18next interpolacija](https://docs.weblate.org/hr/latest/user/checks.md#check-i18next-interpolation) |
<!-- AUTOGENERATED END: format-features i18nextv4 -->
<!-- AUTOGENERATED START: format-features i18next -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.json`                                                                                          |
|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične i dvojezične                                                                        |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `Yes`                                                                                            |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `No`                                                                                             |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                                                                                             |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `No`                                                                                             |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `No`                                                                                             |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `No`                                                                                             |
| Identifikator API-ja                                                                                       | `i18next`                                                                                        |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `No`                                                                                             |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                                                                                             |
| Provjeri oznake koje je dodao ovaj format [ⓘ](https://docs.weblate.org/hr/latest/admin/checks.md#custom-checks)   | [i18next interpolacija](https://docs.weblate.org/hr/latest/user/checks.md#check-i18next-interpolation) |
<!-- AUTOGENERATED END: format-features i18next -->

## Weblate konfiguracija

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component)   |
|---------------------------------------|-----------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `langs/*.json`                                                                                      |
| Jednojezična datoteka osnovnog jezika | `langs/en.json`                                                                                     |
| Predložak za nove prijevode           | Empty                                                                                               |
| Format datoteke                       | i18next JSON file v3                                                                                |
