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

# Translations

> Define localized text strings that an agent can use across its configured languages.

Translations define localized text strings for your agent. Each translation has a key and a set of language-specific values, so the agent can respond in the user's configured language.

Translations are paired with [languages](https://docs.poly.ai/adk/reference/resources/languages.md): every translation key must include an entry for the default language and for each additional language the project supports.

## Location

Translations are defined in:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
config/translations.yaml
```

Translations are listed under the `translations` key. The file is optional.

## What a translation contains

| Field | Description |
| - | - |
| `name` | Translation key identifier. Referenced in rules, topics, and flows as `{{tn:name}}`. |
| `translations` | Map of BCP 47 language codes to localized text strings. |

## Example

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
translations:
  - name: greeting
    translations:
      en-GB: Hello, how can I help you?
      fr-FR: Bonjour, comment puis-je vous aider?
  - name: farewell
    translations:
      en-GB: Goodbye, have a nice day!
      fr-FR: Au revoir, bonne journée!
```

## Validation

* `name` is required and cannot be empty.
* Each translation must have at least one language entry, and a language key cannot be empty.
* If `agent_settings/languages.yaml` is present, every configured language (default + additional) must have an entry in each translation, and no entry may exist for a language that isn't configured. Missing or extra languages both cause a validation error.
* Each translation `name` must be unique.

## Referencing translations

Translations are referenced by name in rules, topics, and flow prompts:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
{{tn:greeting}}
```

At runtime, the platform resolves the reference to the localized string for the current conversation language.

## Best practices

* use descriptive translation keys that indicate purpose (e.g. `greeting`, `error_not_found`, `confirmation_prompt`)
* ensure every configured language has an entry for every translation key before pushing
* keep translation values consistent in tone and meaning across languages
* prefer translation references over hard-coded strings in prompts when an agent supports more than one language

> [!WARNING]
>
> **Translation keys are shared across channels**
>
> A translation key resolves to the same value on voice and chat. Use [SMS templates](https://docs.poly.ai/adk/reference/resources/sms.md) when you need channel-specific copy.

## Related pages

> [card] [Languages](https://docs.poly.ai/adk/reference/resources/languages.md)
>
> Configure the default and additional languages that translations must cover.

> [card] [Agent settings](https://docs.poly.ai/adk/reference/resources/agent_settings.md)
>
> See how translations fit alongside other agent configuration.

> [card] [SMS templates](https://docs.poly.ai/adk/reference/resources/sms.md)
>
> Reusable SMS bodies, complementary to translations for channel-specific copy.
