Add how-to guide: applying customizations to variant target languages#328
Add how-to guide: applying customizations to variant target languages#328Parvati-DeepL wants to merge 1 commit intomainfrom
Conversation
New guide covering how glossaries and style rules must be created with root language codes but can be applied to any variant in /translate calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Pull request overview
Adds a new how-to guide explaining how to create glossaries/style rules using root language codes and then apply them when translating into language variants via /translate.
Changes:
- New MDX guide page: “How to Apply Customizations to Variants”.
- Adds the new guide to the “Examples and guides” section in
docs.json.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/learning-how-tos/examples-and-guides/customizations-for-variants.mdx | New guide documenting glossary/style-rule creation vs. usage with language variants |
| docs.json | Adds the new guide page to the docs navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### 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: |
There was a problem hiding this comment.
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”).
| 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: | |
| Glossaries should be created using the root/base language code. Variant codes (e.g. `zh-Hant`, `pt-BR`, `fr-CA`) are not required for glossary creation and may not be accepted; use the base code instead: |
|
|
||
| ### 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. |
There was a problem hiding this comment.
“the root glossary will be picked up automatically” is a bit misleading: the glossary is only applied if the request includes the glossary/glossary_id, but the dictionary selection will resolve from the root glossary to the target variant automatically. Suggest clarifying that you still need to pass the glossary ID.
| 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. |
|
|
||
| Style rules cannot be created for variant codes — attempting to create one for `fr-CA`, `es-419`, or `de-CH` via the API returns a "language not supported" error. Use the root code only. | ||
|
|
||
| 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. |
There was a problem hiding this comment.
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`. |
New guide covering how glossaries and style rules must be created with root language codes but can be applied to any variant in /translate calls.