TOML

在 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

語言能力 ⓘ

單語言

支援複數 ⓘ

No

支援描述 ⓘ

No

支援解釋 ⓘ

No

支援情境 ⓘ

No

支援位置 ⓘ

No

支援旗標 ⓘ

No

API 辨識碼

toml

支援唯讀字串 ⓘ

No

支援移除已不再使用的字串 ⓘ

No

Weblate 設定

典型的 Weblate 組件設定

檔案遮罩

langs/*.toml

單語言基底語言檔案

langs/en.toml

新翻譯的範本

空白

檔案格式

TOML 檔案