Skip to main content

Django app with updated makemessages command to add automatic translation.

Project description

  1. Add “po_translate” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        "po_translate",
    ]
  2. If you already have a makemessges command defined somewhere in your application, remove your command or specify the po_translate application on top of it like this:

    INSTALLED_APPS = [
        ...,
        "po_translate",
        "app"
    ]
  3. Run the command as usual:

    python manage.py makemessages -l en -d django

If your .po file contains lines without translation, then the translation of the specified locale will be added to them

4.If you do not want translation to be added, run the command with the -no–translate switch:

python manage.py makemessages -l en -d django --no-translate

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-po-translate-0.12.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

django_po_translate-0.12-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

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