Stop copy-pasting to and from Google Translate. Translate your Django .po files automatically with AI.
Project description
translatebot-django
Stop copy-pasting to and from Google Translate. Translate your Django .po files automatically with AI.
The Problem
Maintaining translations in Django is painful:
- Opening
.pofiles, copying to Google Translate, pasting back - repeat 200 times - Placeholders like
%(username)sget mangled and crash your app - Source strings change, and now you need to update .po files for all 10 languages
- Hours spent on translations instead of building features
The Solution
One command translates everything while preserving your Django placeholders:
python manage.py translate --target-lang fr
Features
- Multiple AI Providers: OpenAI, Anthropic, Google Gemini, Azure, and many more
- 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
Installation
pip install translatebot-django
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file translatebot_django-0.3.2.tar.gz.
File metadata
- Download URL: translatebot_django-0.3.2.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b351946211bb1067ceadcb568c2b053fcd1b91f2b466ba85b2a4adb1988d67c0
|
|
| MD5 |
a30044c96da75bcb505b0ac112053c04
|
|
| BLAKE2b-256 |
ea90953d60c47a9f90f1eb0bcf7b86f34716b88350a11b0f10b0f324b146c896
|
Provenance
The following attestation bundles were made for translatebot_django-0.3.2.tar.gz:
Publisher:
publish.yml on gettranslatebot/translatebot-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
translatebot_django-0.3.2.tar.gz -
Subject digest:
b351946211bb1067ceadcb568c2b053fcd1b91f2b466ba85b2a4adb1988d67c0 - Sigstore transparency entry: 813321210
- Sigstore integration time:
-
Permalink:
gettranslatebot/translatebot-django@a3822ad4a254eb64f105b478bb467bc344333209 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/gettranslatebot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3822ad4a254eb64f105b478bb467bc344333209 -
Trigger Event:
release
-
Statement type:
File details
Details for the file translatebot_django-0.3.2-py3-none-any.whl.
File metadata
- Download URL: translatebot_django-0.3.2-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2837a350c6731b4760b5aa1570604345d9976654a5f22578f4a72f5d180f9072
|
|
| MD5 |
caa33c86f28513e1c53d24b4e6889236
|
|
| BLAKE2b-256 |
5e3479d3ec423020081f7e3ee84631495ec4b0bd5cb68b1ad20760285be0bebf
|
Provenance
The following attestation bundles were made for translatebot_django-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on gettranslatebot/translatebot-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
translatebot_django-0.3.2-py3-none-any.whl -
Subject digest:
2837a350c6731b4760b5aa1570604345d9976654a5f22578f4a72f5d180f9072 - Sigstore transparency entry: 813321211
- Sigstore integration time:
-
Permalink:
gettranslatebot/translatebot-django@a3822ad4a254eb64f105b478bb467bc344333209 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/gettranslatebot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3822ad4a254eb64f105b478bb467bc344333209 -
Trigger Event:
release
-
Statement type: