-
Notifications
You must be signed in to change notification settings - Fork 7
Add how-to guide: applying customizations to variant target languages #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,126 @@ | ||||||
| --- | ||||||
| title: "How to Apply Customizations to Variants" | ||||||
| description: "Learn how to apply glossaries and style rules when translating into language variants like FR-CA or EN-GB." | ||||||
| public: true | ||||||
| --- | ||||||
|
|
||||||
| ## Glossaries | ||||||
|
|
||||||
| ### Creation — root codes only | ||||||
|
|
||||||
| Glossaries must be created using the root/base language code. Attempting to create a glossary with a variant code (e.g. `zh-Hant`, `pt-BR`, `fr-CA`) will fail. Use the base code instead: | ||||||
|
|
||||||
| | Use this | Not this | | ||||||
| |---|---| | ||||||
| | `zh` | `zh-Hant`, `zh-Hans` | | ||||||
| | `pt` | `pt-BR`, `pt-PT` | | ||||||
| | `fr` | `fr-CA`, `fr-CH` | | ||||||
| | `de` | `de-CH` | | ||||||
| | `it` | `it-CH` | | ||||||
| | `es` | `es-ES`, `es-419` | | ||||||
|
|
||||||
| ### Application — variants are supported | ||||||
|
|
||||||
| Once a glossary is created with a root code, it can be applied when translating into any variant of that language. The `target_lang` in the `/translate` call can be a variant, and the root glossary will be picked up automatically. | ||||||
|
||||||
| Once a glossary is created with a root code, it can be applied when translating into any variant of that language. The `target_lang` in the `/translate` call can be a variant, and the root glossary will be picked up automatically. | |
| Once a glossary is created with a root code, it can be applied when translating into any variant of that language. The `target_lang` in the `/translate` call can be a variant, but you must still pass the glossary ID in the request. When you do, DeepL will automatically resolve from the root glossary to the appropriate dictionary for the target variant. |
Copilot
AI
Apr 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentence about “With the Q2 release, Tier 2/3 languages … are being added” isn’t referenced elsewhere in the docs/changelog and is time-relative (will become stale quickly). Consider removing the release-timing claim or linking to an explicit changelog/announcement and using a specific date/version if available.
| Style rules for creation are currently supported for: `en`, `de`, `fr`, `es`, `it`, `ja`, `ko`, `zh`. With the Q2 release, Tier 2/3 languages (`vi`, `nl`, `ar`, `pt`, etc.) are being added for root-code style rule creation. | |
| Style rules for creation are currently supported for: `en`, `de`, `fr`, `es`, `it`, `ja`, `ko`, `zh`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc states that creating a glossary with a variant code (e.g.
zh-Hant,pt-BR) “will fail”. In the published OpenAPI description we only document that specifying a variant for EN/PT/ZH is not necessary, not that it is rejected. Consider rewording to avoid an incorrect guarantee (e.g. “use the base/root code; variants are not required / may not be accepted”).