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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9181542077b6547e8a7a0310b2c0cb128daf3cb287163fb261cb38fa069d792c |
|
MD5 | 5eca51245e41135299adbb3177643fa4 |
|
BLAKE2b-256 | f66e224172da57cd7f25b8ad5acf59d2b63ab9754fdc8543dc5c0cd7ba7978f6 |