DeepL¶
DeepL is a dedicated translation service known for high-quality translations, especially for European languages. TranslateBot supports DeepL as an alternative to LLM-based translation.
Why DeepL?¶
- Free to try: new API accounts get a one-time credit of 1 million characters
- Fast: Direct translation API, no prompt engineering overhead
- Quality: Consistently high quality for supported language pairs
- Simple: No model selection needed, just an API key
Setup¶
1. Install the DeepL extra¶
2. Get an API key¶
Sign up for a DeepL API account at deepl.com/pro-api. The Developer plan includes a one-time credit of 1 million characters. After that, the Growth plan includes 12 million characters per year, and extra characters are billed per million. See DeepL API plans for current prices.
3. Configure Django settings¶
import os
TRANSLATEBOT_PROVIDER = "deepl"
TRANSLATEBOT_API_KEY = os.getenv("DEEPL_API_KEY")
That's it! Run the translate command as usual:
Supported Languages¶
DeepL supports 30+ target languages. TranslateBot automatically converts Django language codes to DeepL's format:
| Django code | DeepL code | Language |
|---|---|---|
de |
DE |
German |
fr |
FR |
French |
nl |
NL |
Dutch |
es |
ES |
Spanish |
pt-br |
PT-BR |
Portuguese (Brazil) |
en |
EN-US |
English (US) |
zh-hans |
ZH-HANS |
Chinese (Simplified) |
ja |
JA |
Japanese |
For the full list of supported languages, see the DeepL API documentation.
Regional defaults
When you use en or pt without a region suffix, TranslateBot defaults to EN-US and PT-BR respectively, as DeepL requires a regional variant for these languages.
Limitations¶
No TRANSLATING.md support¶
DeepL's API does not accept custom instructions like LLM providers do. If your project has a TRANSLATING.md file, TranslateBot will show a warning and ignore it when using DeepL:
For custom terminology with DeepL, consider using DeepL glossaries directly.
Placeholder protection¶
TranslateBot automatically protects format placeholders (%(name)s, {placeholder}, %s, etc.) from being mangled by DeepL during translation. Placeholders are swapped for neutral tokens that DeepL leaves alone (such as ph0@tb.x) before sending, and restored in the result. HTML tags are preserved with DeepL's HTML tag handling.
Plural forms¶
DeepL can't translate into a language's specific plural forms. The singular and plural of each message are translated as two strings, and the plural translation is used for every form after the first. For languages with more than two plural forms (Polish, Russian, Czech, Arabic, …), review plural entries or use an LLM provider, which translates every form. See Plural Forms.
API limits¶
DeepL enforces per-request limits. TranslateBot handles batching automatically:
- Max 50 texts per API request
- Max 128 KB total request size
Character limits¶
The Developer plan's one-time credit covers 1 million characters, and Growth includes 12 million characters per year. TranslateBot's incremental translation (only translating new/changed strings) helps you stay within these limits.
DeepL vs LLM Providers¶
| DeepL | LLM (GPT, Claude, etc.) | |
|---|---|---|
| Cost | Free tier available | Pay per token |
| Speed | Fast | Varies by model |
| Custom context | Not supported | TRANSLATING.md support |
| Terminology control | Via DeepL glossaries | Via TRANSLATING.md |
| Language coverage | 30+ languages | Any language |
| Model selection | None needed | Many options |
When to use DeepL
DeepL is a great choice when you want fast, high-quality translations without configuring an LLM provider, especially if your target languages are well-supported by DeepL and you don't need custom context via TRANSLATING.md.
When to use an LLM
LLM providers are better when you need custom terminology or tone guidelines via TRANSLATING.md, or when translating to languages not supported by DeepL.