- How to translate between language variants (e.g.,
en-UStoen-GB,pt-PTtopt-BR) - Which method to choose: Write API, style rules, or custom instructions
- An example workflow for converting American English to British English
Methods for translating between variants
You can use the DeepL API to translate between variants of the same language using 3 methods:1. DeepL Write API
Use the /write/rephrase endpoint to rephrase text into the target language variant. When to use this:- You’re translating shorter texts (headlines, product names, brief descriptions)
- You want high-quality rephrasing alongside variant translation
Example cURL request
Example response
2. Style rules with custom instructions
Create a reusable style rule with attachedcustom_instructions describing the desired variant translation.
When to use this:
- You need to maintain the text’s content between variants as precisely as possible
- You need consistent variant transformations across many translation requests
- You want to reuse the same variant rules without repeating the custom instructions
Example cURL request
Example response
Glossaries and style rules are unique to each of DeepL’s global data centers and are not shared between them.Clients using the
api-us.deepl.com endpoint will not be able to access glossaries or style rules created in the UI at this time.3. Per-request custom instructions
Add custom_instructions describing the desired variant translation directly into your/translate requests.
When to use this:
- You need to maintain the text’s content between variants as precisely as possible
- You need ad-hoc, one-off translations with specific variant requirements
- You don’t want to manage separate style rules
Example cURL request
Example response
Next steps
Now that you understand how to translate between language variants:- Try it yourself: Test out style rules and custom instructions in the text translation API playground
- Learn about the Write API: Explore the /write/rephrase endpoint for high-quality variant translation and rephrasing
- Manage reusable rules: Learn how to create style rules for systematic variant transformations
- Improve translation quality: Understand how the context parameter can enhance ambiguous translations