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.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a5f8381193e3f4c00c226ac81aa0f02ca6e77a9d1e33ae568f8612280cfd99 |
|
MD5 | d411bc40002d498aceaccf0678076965 |
|
BLAKE2b-256 | 34a58515159d6757f8be1fbd7965a93c281ade61058e8a01499b3506544f20c1 |