This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Translator is an app for collecting translations for specified keys in django admin.

Project Description
===========
Translator
===========

Translator is an app for collecting translations for specified keys in django admin.

Quick start
-----------

1. Add "translator, taggit, modeltranslation" to your INSTALLED_APPS setting like this::

INSTALLED_APPS = (
...
'taggit',
'modeltranslation',
'translator',

)

#. You have to set the migrations folder for the translator, because we have to add migrations for the set languages. Add the following to your settings file:

MIGRATION_MODULES = {
'translator': 'my_project.translator_migrations',
}

#. Create a ``translator_migrations`` python package in your project folder (where your settings.py usually is).

#. Run ``python manage.py makemigrations translator`` to create the translator models based on the languages you specified in your settings file.

#. Run ``python manage.py migrate`` to migrate the translator models to your database.

#. If you intend to use it in the templates, add 'translator.context_processors.translator' to TEMPLATE_CONTEXT_PROCESSORS ::

TEMPLATE_CONTEXT_PROCESSORS = (
...
'translator.context_processors.translator',
)

#. Create translation keys in your templates and models.

Examples:

Template::

{{ translator.a_key }}

models.py::

from translator.util import translator_lazy as _
...

class Product(models.Model):
name = models.TextField(verbose_name=_(u"a_key"))

#. Visit the templates. The keys get collected lazy.

#. Translate the keys in the admin.


#. You can disable the translator by setting DJANGO_TRANSLATOR_ENABLED to False.

Project Home
------------
https://github.com/dreipol/django-translator

PyPi
------------
https://pypi.python.org/pypi/django-translator
Release History

Release History

This version
History Node

1.0.10

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-translator-1.0.10.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source Sep 10, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting