Skip to main content
DeepL supports regional language variants such as PT-BR vs PT-PT, or FR-CA vs FR-FR. When applying glossaries, customizations must be created using the root language code, but can be applied to any variant of that language. This guide shows you:
  • How to create glossaries using root language codes (e.g. PT, FR)
  • How to pass a glossary when translating into a variant target (e.g. pt-BR, fr-CA)
  • A practical example of using variant-specific glossaries to enforce locale-appropriate terminology

Creating a glossary for a language

DeepL distinguishes between root language codes (e.g. pt) and language variant codes (e.g. pt-BR). Glossaries must be created with the root code. Attempting to create one with a variant code will fail. See supported languages for the full list.
This restriction only applies to glossaries. Other customizations like style rules support language variants.
The following example creates two glossaries to enforce different terms for “invoice” in Brazilian and European Portuguese. Both use the root language code PT:
Example: Create glossaries with root language codes

Applying a glossary to a language variant

Once a glossary is created with a root language code, pass its ID in the /translate call with a variant target_lang:
Example: Apply glossaries to variant targets

CAT tools

Some CAT tools may prevent applying a glossary linked to a root code language when the target language is a variant. This is an incorrect limitation that does not reflect the DeepL API’s behavior. You’ll need to reach out to your CAT tool provider to request this restriction is removed.

Next steps