TranslateBot Django¶
โก Translate Django .po files and model fields with AI. Repeatable, consistent, and pennies per language.
The Problem¶
Translating a Django app sounds simple until it isn't:
- Manual workflow doesn't scale. Copy strings to Google Translate, paste back, fix placeholders, repeat for every language. It works for 20 strings. It falls apart at 200.
- AI assistants work once, but not repeatedly. You can ask ChatGPT or Claude Code to translate a
.pofile, and it'll do a decent job. Once. Next sprint, when 15 new strings appear, you're prompting from scratch, re-translating the whole file, and hoping it stays consistent. - SaaS translation platforms are expensive overkill. Paid localization services charge per-word subscriptions and come with portals, review workflows, and team features you don't need for a solo project or small team.
Why a Dedicated Tool?¶
TranslateBot sits between "do it by hand" and "pay for a platform":
- Incremental. Only translates new and changed strings. Add 10 strings in a sprint, pay for 10 strings, not the whole file.
- Consistent. A
TRANSLATING.mdfile in your repo acts as a version-controlled glossary: terminology, tone, brand rules. Every translation run uses it. - Cost-efficient. Batches strings into optimized API requests. A typical app costs under $0.01 per language with GPT-4o-mini.
- Scales to many languages. One command translates all your configured languages. Adding a new locale is a one-liner.
- Automatable. A CLI command you can script or hook into your workflow. No browser, no portal.
- Placeholder-safe. Preserves
%(name)s,{0},%s, and HTML tags with 100% test coverage on format string handling.
Features¶
-
Multiple Providers
Supports DeepL, OpenAI, Anthropic Claude, Google Gemini, Azure OpenAI, and 100+ models via LiteLLM
-
Model Field Translation
Supports django-modeltranslation for translating database content
-
Smart Translation
Preserves placeholders (
%(name)s,{0},%s) and HTML tags automatically -
Flexible Configuration
Django settings, environment variables, or command-line arguments
-
Selective Translation
Only translates new and changed strings, unlike AI assistants that reprocess everything each time
-
Dry Run Mode
Preview translations before applying them
-
Well Tested
Comprehensive test suite with 100% code coverage
-
Easy Integration
Simple Django management command
Quick Example¶
# Install
uv add --dev translatebot-django
# Configure (settings.py)
INSTALLED_APPS = ['translatebot_django', ...]
TRANSLATEBOT_API_KEY = "your-api-key"
# Translate!
python manage.py translate --target-lang nl
Supported Versions¶
| Python | Django |
|---|---|
| 3.10, 3.11, 3.12, 3.13, 3.14 | 4.2, 5.0, 5.1, 5.2, 6.0 |
Getting Started¶
Ready to translate your Django app? Start with the Installation Guide.