Skip to main content

README

Travis Code Health PYPI Read the docs

Django app for managing translations from admin.

Using this django app you can easily manage and publish translations from django admin without editing .po files manually.

Install package

  • use pip to get the package

pip install django-translation-manager
  • add ‘translation_manager’ to settings.py: INSTALLED_APPS

  • add variables from Translation Manager’s defaults.py to your settings.py

  • add post_publish signal to restart webserver:

from translation_manager.signals import post_publish as translation_post_publish

translation_post_publish.connect(restart_server, sender=None)

Supported versions of django

We support all django versions greater or equal 2.2.20.

Using with django-rq

We support asynchronous translation processing by django-rq.

Set translation processing method in settings.py

TRANSLATIONS_PROCESSING_METHOD = 'async_django_rq'

Inslall django-rq

pip install django_rq

Install django-redis-cache

pip install django-redis-cache

We tested it with django-rq 2.1.0 and django-redis-cache 2.1.0

For configuration django_rq see https://github.com/ui/django-rq

Using with Angularjs

We support translation for Angularjs client-site app via REST api

Enable api communication in settings

TRANSLATIONS_ENABLE_API_COMMUNICATION = True

Enable searching for translation strings in Angularjs source codes

TRANSLATIONS_ENABLE_API_ANGULAR_JS = True

Set path to Anguraljs source code files.

The important thing is that it must be in the same file system.

Configuration example:

TRANSLATIONS_API_CLIENT_APP_SRC_PATH = '/var/srv/front/src'

Add regex for matching translation strings in client app src files:

TRANSLATIONS_API_TRANSLATION_STRINGS_REGEX = r''

Inslall django REST framewrok

pip install djangorestframework

Add translation manager urls in your url patterns

from translation_manager import urls as translation_urls

urlpatterns.append(url(r'^translations/', include(translation_urls)))

We tested it with django-rest-framework 3.4.6

SyncDB

use syncdb

./manage.py syncdb

or migrate:

./manage.py migrate

Load strings from po files

via python shell

./manage.py shell

from translation_manager.manager import Manager

m = Manager()
m.load_data_from_po()

Known bugs

If you are using different base site you have to register admin to your site.

License note

Django Translation Manager is available under Mozilla Public License 2.0

http://choosealicense.com/licenses/mpl-2.0/

Donate

https://img.shields.io/badge/paypal-donate-yellow.svg

Thank you!

We really appreciate every donation that helps us take Django Translation Manager to the next level.

Metadata

Release files for django-translation-manager 1.3.1

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-translation-manager 1.3.1
File Size Uploaded
django_translation_manager-1.3.1.tar.gz 34.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-translation-manager 1.3.1
File Interpreter ABI Platform
django_translation_manager-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 93.3 kB

Release files / django_translation_manager-1.3.1.tar.gz

Download URL django_translation_manager-1.3.1.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
beae1d388f56bf5a800614faed1f5fa50beb60e79e44f5fac32425d4f869c62b
BLAKE2b-256 checksum
How to use checksums
32b39972d9752d892012e56de2365bd89123788c3500823cb7e7f19fb6bc6a56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / django_translation_manager-1.3.1-py3-none-any.whl

Download URL django_translation_manager-1.3.1-py3-none-any.whl
Size 59.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7d7051a0b77b117db9298d5329d07ff633b8136c54426ddbbdd6908d9d56a31
BLAKE2b-256 checksum
How to use checksums
2fa7b8fbbb9b89af5cbde844a9037d65b675c73fad68abc08b75885e09533e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.5.1

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

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