Pliki JSON i18next¶
Zmienione w wersji 4.15.1: Support for v4 variant of this format was added.
Podpowiedź
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.
Plik JSON i18next v4¶
Choose this format if unsure. It stores plurals using standard CLDR suffixes.
Plik JSON i18next v3¶
Use for legacy projects which are using numeric suffixes for plurals.
Informacja
The v2 and v1 variants are mostly compatible with v3, with exception of how plurals are handled.
Zobacz także
JSON, Format JSON i18next, Updating target-language files, Dostosuj wyjście JSON, Wyczyść pliki tłumaczenia
Przykładowy plik:
{
"hello": "Hello",
"apple": "I have an apple",
"apple_plural": "I have {{count}} apples",
"apple_negative": "I have no apples"
}
Konfiguracja Weblate¶
Typowy Weblate Konfiguracja komponentu |
|
---|---|
Maska pliku |
|
Jednojęzyczny bazowy plik języka |
|
Szablon dla nowych tłumaczeń |
Puste |
Format pliku |
i18next JSON file v3 |