> ## Documentation Index
> Fetch the complete documentation index at: https://hyperlocalise.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 配置架构

> hyperlocalise i18n 配置架构的简明参考。

## 顶级键

* `locales`
* `buckets`
* `groups`
* `llm`
* `storage`（用于`sync`为必填）
* `cache`（可选）

## `locales`

* `source`（字符串，必填）
* `targets`（字符串数组，必需）
* `fallbacks`（对象，可选）

## `buckets`

* 桶名称到存储桶定义的映射
* `files` 带有 `from` 和 `to` 模板

## `groups`

* 组名到组定义的映射
* `targets` 数组
* `buckets` 数组

## `llm`

* `profiles` profile 名称到 provider/model/prompt 的映射
* 用于上下文构建覆盖的可选`context_memory`对象，包含`provider`和`model`
* 支持的提供方： `openai` | `azure_openai` | `anthropic` | `gemini` | `bedrock` | `lmstudio` | `groq` | `mistral` | `ollama`
* `rules` 数组，包含 `priority`、`group`、`profile`

## `storage`

* `adapter`: `poeditor` | `lilt` | `lokalise` | `crowdin` | `phrase` | `smartling`
* `config`：适配器特定字段

## `cache`

* `enabled` 布尔值
* `endpoint` 字符串
* `project_key_env` 字符串
* `timeout_seconds` 整数

有关示例，请参见 [i18n 配置](/configuration/i18n-config)。

## CSV 工作流说明

在运行基于 CSV 的本地化流程时，请使用 `buckets.*.files[].from` 和 `to` 指向 `.csv` 文件。

* 按区域设置的文件通常在 `[locale]` 路径中使用 `to`。
* 共享 CSV 文件可以复用相同的 `from` 和 `to` 路径。

## Fluent 工作流说明

使用 `buckets.*.files[].from` 和 `to` 指向用于 Mozilla Fluent 本地化流程的 `.ftl` 文件。

* 按语言环境的文件通常在 `[locale]` 路径中使用 `to`，例如 `locales/[locale]/messages.ftl`。
* 支持的条目包括消息、属性、多行值以及作为完整值表示的 select/plural 模式。
* 不支持 Fluent 术语，且解析会失败，而不会被重写。

## Java 属性工作流说明

使用 `buckets.*.files[].from` 和 `to` 指向按区域设置划分的 `.properties` 资源包，例如 `messages_{{source}}.properties` -> `messages_{{target}}.properties`。
