i18next JSON 檔案

在 4.15.1 版的變更: Support for v4 variant of this format was added.

提示

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.

i18ext翻譯是單語言,因此建議使用(最常見的)英語字串指定基本文件。

i18next JSON 檔案 v4

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

i18next JSON 檔案 v3

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

備註

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

範例檔案:

{
  "hello": "Hello",
  "apple": "I have an apple",
  "apple_plural": "I have {{count}} apples",
  "apple_negative": "I have no apples"
}
支援的功能

副檔名

.json

語言能力

單語言和雙語言

支援複數

Yes

支援描述

No

支援解釋

No

Supports context

No

Supports location

No

Supports flags

No

API 識別碼

i18nextv4

支援唯讀字串

No

Check flags added by this format

i18next 插值

支援的功能

副檔名

.json

語言能力

單語言和雙語言

支援複數

Yes

支援描述

No

支援解釋

No

Supports context

No

Supports location

No

Supports flags

No

API 識別碼

i18next

支援唯讀字串

No

Check flags added by this format

i18next 插值

Weblate 配置

典型的 Weblate 組件配置

檔案遮罩

langs/*.json

單語言基底語言檔案

langs/en.json

新翻譯的範本

空白

檔案格式

i18next JSON 檔案 v3