Skip to main content

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.

pypi-version pypi-downloads-month requirements

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:

  1. -l, --locale 'locale': Only translate the specified locales

python manage.py translate_messages -l 'de' -l 'es'

Settings:

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-autotranslate-0.7.0.tar.gz (6.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page