Skip to main content

Django-Polyglot: DeepL integration for Django

Django-Polyglot is an integration of Polyglot for Django Web Framework.

It provides a CLI command that, using the DeepL API, automates the translation of your static texts.

Installation

Django Polyglot can be easily installed by running:

pip install django-polyglot-translator

Make sure you've configured Django internationalization.

Now you have to register Django-Polyglot in your settings like this:

INSTALLED_APPS = [
    ...
    'djangoPolyglot'
]

Finally, you need to store your DeepL API key in your settings.

POLYGLOT_DEEPL_LICENSE = "your DeepL API key"

Usage

Translate

Django-Polyglot will run for you the Django "makemessages" command, preparing the .po files with the text to be translated. Then Polyglot will use the DeepL APIs to translate this files. Finally the Django "compilemessages" command will be ran and your static translations will be ready.

./manage.py django-polyglot translate

⚠️To use the translate command you need to set LANGUAGE_CODE, LANGUAGES and LOCALE_PATHS in your settings, according the Django documentation.

Usage info

It returns DeepL usage info related to your API key, run with:

./manage.py django-polyglot print_usage_info

Supported languages

It returns the list of languages currently supported by DeepL, run with:

./manage.py django-polyglot print_supported_languages

Dependencies

The only dependency is Polyglot.

License

Django-Polyglot is provided under the MIT license.

Metadata

Release files for django-polyglot-translator 1.2.2

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-polyglot-translator 1.2.2
File Size Uploaded
django-polyglot-translator-1.2.2.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-polyglot-translator 1.2.2
File Interpreter ABI Platform
django_polyglot_translator-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / django-polyglot-translator-1.2.2.tar.gz

Download URL django-polyglot-translator-1.2.2.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
887c3306f4c0dcba54a96848ac6c96a297d850b1986c123009275329f20566cb
BLAKE2b-256 checksum
How to use checksums
c6d5ccafe0ae2b37f9e631fa14cdf0819e47244fd0dd8c694eeeaefb95987b4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / django_polyglot_translator-1.2.2-py3-none-any.whl

Download URL django_polyglot_translator-1.2.2-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b5b823d1c09f25362ae4131380f8348b3a3ac33ae373ff6036b08437b146557
BLAKE2b-256 checksum
How to use checksums
04afe9c6d1561f132ecc08a05a7f1457587b8e3d3e1ad14da07d3913bb0f7e27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

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