Skip to main content

Automatically translate Django's pot Files

Project description

Upload Python Package

django-deep-translator django-auto-translator

Autotranslate django .po translation files package built on top of deep-translator

Finds all the generated pot (.po) files under the locale paths (LOCALE_PATHS) specified in django project settings, and translates them automatically with default source language as english.

Install

Install via PIP

  pip install django-auto-translator

Add 'django-auto-translator' to your INSTALLED_APPS setting:

INSTALLED_APPS = (
 ...
 'django-auto-translator',
 )

Command translate to all languages

python manage.py translate_messages

Option Parameter

  • -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
  • -S, --silent: Don't show the verbose output
  • -t, --throttle: Throttle the maximum of seconds for the next translate request(default=10 sec)

Example:

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

Important Django Language Setting

In your settings, list the relative path to locale folders, example:

LOCALE_PATHS = (
    'locale',
    'home/locale',
    'products/locale',
    'services/locale',
)

Credits

Forked from: https://github.com/wmo-raf/django-deep-translator

Artwork Logo from Eypros: https://openclipart.org/artist/Eypros

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_auto_translator-0.1.2.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_auto_translator-0.1.2-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file django_auto_translator-0.1.2.tar.gz.

File metadata

  • Download URL: django_auto_translator-0.1.2.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for django_auto_translator-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3f46e99595873071c5e1962c581fd3fff4113747f267501700b826f0c8d996f9
MD5 41117931de381b791c2b9037a29d72a4
BLAKE2b-256 d5332832cae5f9244f98e274a008c074fae2aef3a4b027f7850509095baa0ffa

See more details on using hashes here.

File details

Details for the file django_auto_translator-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_auto_translator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c113be16964f3ffe1fee9171cc0d44abb99f0af4485fdbcdf24f8c6438ae50af
MD5 a2c2377ba3e37e491e7689a63c5c673e
BLAKE2b-256 57632dca61ce7cc3887ed80564a1ef363025b1269f5ac04fad26bd40f683fd48

See more details on using hashes here.

Supported by

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