Django AutoTranslate

MIT License Ruff PyPI Version Python Versions Django Versions Development Status Typed Documentation Status Code Coverage Test Status Lint Status Published on Django Packages

django-autotranslate machine translates the message files (.po) that Django’s makemessages command creates. It sends the messages that need translating to a machine translation service, protects placeholders like %(name)s and HTML markup from being translated, and writes the translations back into your message files.

$ django-admin makemessages -l de -l es
$ django-admin autotranslate
$ django-admin compilemessages

It works with the free Google Translate service out of the box, and with the paid Google Cloud Translation and Amazon Translate services.

Note

Machine translations are a starting point, not a replacement for human translators. Have people who speak your languages review them, see Review machine translations.

Where to start

Tutorial: your first run

New to django-autotranslate? Translate a small Django project from start to finish.

How-to guides

Step by step guides for common tasks: using a paid service, choosing languages, reviewing translations, keeping them up to date and automating them in CI.

Reference

The autotranslate command, settings, supported languages and the Python API.

Explanation

How the command decides what to translate, how placeholders and markup are protected, how language codes are matched and how to choose a service.