Automatically translate Django's pot Files
Project description
django-auto-translator
Autotranslate django .po translation files package built on top of deep-translator
Installation
pip install django-auto-translator
Add 'django-auto-translator' to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'django-auto-translator',
)
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 with default source language as english.
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-S, --silent: Don't show the verbose output-t, --throttle: Throttle the maximum of seconds for the next translate request(default=10 sec)
python manage.py translate_messages -l 'de' -l 'es'
Settings
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_auto_translator-0.1.1.tar.gz.
File metadata
- Download URL: django_auto_translator-0.1.1.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0e5f1b1c0f0c021f8d01db65c8fa89d672a41502296fa61c09204d8fef0f624
|
|
| MD5 |
d02a456b1bbd8573eb50a5013371df71
|
|
| BLAKE2b-256 |
704dbec9a80ca10ae7dc8ee9bcd9e658f75d6ee11ff821eb7dba487859d2c6d6
|
File details
Details for the file django_auto_translator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_auto_translator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee4e9b07cd4888a95244a0684e5f8963552b3fe398eb87415ab8e6281627a51c
|
|
| MD5 |
6fa89cfe05802602dd511960c0566a04
|
|
| BLAKE2b-256 |
963cc3188e18042e53c40c3a92316657c0f68a8a50c29691604df5d38a3504bf
|