# TOML

#### Versionadded
在 5.15 版被加入.

TOML 是類似 [YAML 檔案](https://docs.weblate.org/zh-tw/latest/formats/yaml.md) 或 [JSON 檔案](https://docs.weblate.org/zh-tw/latest/formats/json.md) 的通用格式，可用來在地化程式。

Weblate 支援數種變體的 TOML：

TOML 檔案
: 不支援複數的純 TOML 檔案。

go-i18n TOML 檔案
: 支援複數的 go-i18n 變體。

#### SEE ALSO
* [TOML](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/toml.html)
* [更新目標語言檔案](https://docs.weblate.org/zh-tw/latest/devel/integration.md#updating-target-files)

範例檔案：

```toml
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"
```

```toml
[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"
```

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

#### 支援的功能

| 副檔名                                                                            | `.toml`   |
|--------------------------------------------------------------------------------|-----------|
| 語言能力 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#bimono)                   | 單語言       |
| 支援複數 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-plurals)           | `No`      |
| 支援描述 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-description)       | `No`      |
| 支援解釋 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-explanation)       | `No`      |
| 支援情境 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-context)           | `No`      |
| 支援位置 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-location)          | `No`      |
| 支援旗標 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#format-flags)             | `No`      |
| API 辨識碼                                                                        | `toml`    |
| 支援唯讀字串 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#read-only-strings)      | `No`      |
| 支援移除已不再使用的字串 [ⓘ](https://docs.weblate.org/zh-tw/latest/formats.md#obsolete-strings) | `No`      |
<!-- AUTOGENERATED END: format-features toml -->

## Weblate 設定

|           | 典型的 Weblate [組件設定](https://docs.weblate.org/zh-tw/latest/admin/projects.md#component)   |
|-----------|-----------------------------------------------------------------------------|
| 檔案遮罩      | `langs/*.toml`                                                              |
| 單語言基底語言檔案 | `langs/en.toml`                                                             |
| 新翻譯的範本    | 空白                                                                          |
| 檔案格式      | TOML 檔案                                                                     |
