# gt: General Translation CLI tool: 纯文本
URL: https://generaltranslation.com/zh/docs/cli/reference/formats/plain-text-files.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 使用 General Translation CLI 翻译纯文本文件。纯文本文件格式的 API 参考。

CLI 会将整个 `txt` 文件视为可翻译内容，而不是解析标记。它会保留基于空白字符的格式，但不会根据结构跳过内容。

## 配置 [#config]

在 `files` 下添加一个 `txt` 条目，并为其设置一个包含 glob 模式的 `include` 数组。使用 `[locale]` 占位符，以便 CLI 能找到原始文件，并将翻译保存到正确的路径。

```json title="gt.config.json"
{
  "defaultLocale": "en",
  "locales": ["es", "fr"],
  "files": {
    "txt": {
      "include": ["docs/[locale]/**/*.txt"]
    }
  }
}
```

请参阅[配置参考](/docs/cli/reference/config#files)，了解所有文件相关配置键，包括用于重命名翻译后输出内容的 `transform`。

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
