Skip to main content

django-autotranslate

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:

  • -f, --set-fuzzy: Set the 'fuzzy' flag on autotranslated entries
  • -l, --locale 'locale': Only translate the specified locales
  • -u, --untranslated: Only translate the untranslated messages
  • -s, --source-language: Override the default source language (en) used for translation
    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>'

Compatibility Matrix:

autotranslate django
v1.0.x Django 1.5+
v1.1.x Django 1.8+

Tests:

    # run test against all environments
    tox
    # run test against a specific environment defined in tox.ini
    # eg. django>1.9 & python3.4
    tox -e dj19-py34

Release files for django-autotranslate 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-autotranslate 1.3.0
File Size Uploaded
django_autotranslate-1.3.0.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-autotranslate 1.3.0
File Interpreter ABI Platform
django_autotranslate-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / django_autotranslate-1.3.0.tar.gz

Download URL django_autotranslate-1.3.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e467dc1937353fbe03cff3d14b91387ef038aa8aedae036112fca198c25ea82c
BLAKE2b-256 checksum
How to use checksums
146bbbb56fb2ef36e3c7f3cdeae215650f9992e126d99c2b5402afc2046709ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / django_autotranslate-1.3.0-py3-none-any.whl

Download URL django_autotranslate-1.3.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9e0d7928dc8df9ce622bf8d14166c04a33e886beb488a70bb1806aef4f2dfbd
BLAKE2b-256 checksum
How to use checksums
4946417ce6536d013732e5b353adfd89627b490386902fb7826e71b4f77438de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page