translatebot-django
⚡ Translate Django .po files and model fields with AI. Repeatable, consistent, and pennies per language.
Documentation: https://translatebot.dev/docs/
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 TranslateBot
TranslateBot is a dedicated tool that 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.
Installation
For PO file translation, TranslateBot is a development tool; install it as a dev dependency:
uv add --dev translatebot-django
For model translation at runtime, install it as a regular dependency instead (see Python API docs):
uv add translatebot-django
Supported versions
Each Django series is tested against the Python versions Django itself supports:
| Django | Python |
|---|---|
| 4.2 | 3.10, 3.11, 3.12 |
| 5.0 | 3.10, 3.11, 3.12 |
| 5.1 | 3.10, 3.11, 3.12, 3.13 |
| 5.2 | 3.10, 3.11, 3.12, 3.13, 3.14 |
| 6.0 | 3.12, 3.13, 3.14 |
| 6.1 | 3.12, 3.13, 3.14 |
Quick Start
# settings.py
INSTALLED_APPS = [
# ...
"translatebot_django",
]
TRANSLATEBOT_API_KEY = "your-api-key-here"
# Translate to Dutch
python manage.py translate --target-lang nl
# Preview without saving
python manage.py translate --target-lang nl --dry-run
Features
- Multiple AI Providers: OpenAI, Anthropic, Google Gemini, Azure, many more, and DeepL
- Smart Translation: Preserves placeholders (
%(name)s,{0},%s) and HTML tags - Model Field Translation: Supports django-modeltranslation
- Flexible Configuration: Django settings, environment variables, or CLI arguments
- Well Tested: 100% code coverage
When to Use TranslateBot
For a one-off translation of 20 strings, ChatGPT works fine. TranslateBot is for ongoing projects with multiple languages where translations need to stay in sync as your code changes.
Use TranslateBot when:
- You're actively developing and strings change every sprint
- You support 3+ languages and want them all updated at once
- You want consistent terminology across translation runs
- You want translations done in seconds, not hours of manual work
Documentation
For full documentation, visit translatebot.dev/docs/
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
# Setup
git clone https://github.com/gettranslatebot/translatebot-django.git
cd translatebot-django
uv sync --extra dev
# Run tests
uv run pytest
License
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.
Credits
Made with ❤️ for the Django community
Metadata
Release files for translatebot-django 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| translatebot_django-1.3.3.tar.gz | 68.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| translatebot_django-1.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 104.9 kB
Release files / translatebot_django-1.3.3.tar.gz
| Download URL | translatebot_django-1.3.3.tar.gz |
|---|---|
| Size | 68.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b16556fd34062ea4415233e2166b4936c662573685c6bc86ac7358f3999e3318
|
|
BLAKE2b-256 checksum How to use checksums |
df4de82461fb3c19b90315d7e27f7221a358dd859a6e513f2bbfad1a7d82e288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / translatebot_django-1.3.3-py3-none-any.whl
| Download URL | translatebot_django-1.3.3-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc3ff3b7c8812be985c6efc5aa9e05877f9c9f079bca1fb268ebd03e9577cd5a
|
|
BLAKE2b-256 checksum How to use checksums |
de2456d6279b9d0119fbed8db1a71ae65ea8cebfcc600fdd5097c2ad8b4a14d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency log