Skip to content

Add how-to guide: applying customizations to variant target languages#328

Open
Parvati-DeepL wants to merge 1 commit intomainfrom
customizations-with-variants
Open

Add how-to guide: applying customizations to variant target languages#328
Parvati-DeepL wants to merge 1 commit intomainfrom
customizations-with-variants

Conversation

@Parvati-DeepL
Copy link
Copy Markdown
Collaborator

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.

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>
Copilot AI review requested due to automatic review settings April 30, 2026 18:41
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
deepl-c950b784 🟢 Ready View Preview Apr 30, 2026, 6:42 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link

Copilot AI Apr 30, 2026

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”).

Suggested change
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:

Copilot uses AI. Check for mistakes.

### 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.
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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.

Suggested change
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 uses AI. Check for mistakes.

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.
Copy link

Copilot AI Apr 30, 2026

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.

Suggested change
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`.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants