A simple Django app to automatically translate the pot (`.po`) files generated by django's makemessages command using google translate.
Project description
A simple Django app to automatically translate the pot (.po) files generated by django’s makemessages command using google translate.
Installation:
pip install django-autotranslate
Add 'autotranslate' to your INSTALLED_APPS setting.
INSTALLED_APPS = ( ... 'autotranslate', )
Quickstart:
python manage.py translate_messages
The command finds all the generated pot (.po) files under the locale paths (LOCALE_PATHS) specified in django project settings, and translates them automatically.
Options:
-l, --locale 'locale': Only translate the specified locales
python manage.py translate_messages -l 'de' -l 'es'
Settings:
Use a different Translation Service:
# default: 'autotranslate.services.GoSlateTranslatorService' # pip install google-api-python-client AUTOTRANSLATE_TRANSLATOR_SERVICE = 'autotranslate.services.GoogleAPITranslatorService' GOOGLE_TRANSLATE_KEY = '<google-api-key>'
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
Close
Hashes for django-autotranslate-0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3df5953567a11df3f4654e3e12513a2d1e71af2639f21ce476d8a752ac9a61e |
|
MD5 | 2ce2a420265987658362fd6149d5998e |
|
BLAKE2b-256 | 5b21652cc31605461449826b9edb61fd647c3507297b3bcbcc62a125e8a3bbc0 |