TOML

Added in version 5.15.

TOML 是类似 YAML 文件 或 JSON 文件 的通用格式,可用来本地化程序。

Weblate 支持数种变体的 TOML:

TOML 文件

不支持复数的纯 TOML 文件。

go-i18n TOML 文件

支持复数的 go-i18n 变体。

示例文件:

hello = "Ahoj světe!\n"
orangutan = "Orangutan má %d banán.\n"
thanks = "Děkujeme za použití Weblate."
try = "Zkus Weblate na <https://demo.weblate.org/>!\n"
[hello]
other = "Ahoj světe!\n"

[orangutan]
one = "Orangutan má %d banán.\n"
other = "Orangutan má %d banány.\n"

[thanks]
other = "Děkujeme za použití Weblate."

[try]
other = "Zkus Weblate na <https://demo.weblate.org/>!\n"
支持的功能

文件扩展名

.toml

Linguality ⓘ

单语言

支持复数 ⓘ

No

支持描述 ⓘ

No

支持解释 ⓘ

No

支持上下文 ⓘ

No

支持位置 ⓘ

No

支持标记 ⓘ

No

API 标识符

toml

支持只读字符串 ⓘ

No

支持删除过时字符串 ⓘ

No

Weblate 配置

典型的 Weblate 部件配置

文件掩码

langs/*.toml

单语言译文模版语言文件

langs/en.toml

新语种的翻译模版

空

文件格式

TOML 文件