Skip to main content

Localize Django applications without compiling .po files

Project description

Description

  • Localize Django applications without installing gettext, pybabel or compiling .po files.

  • Automatically reload translations when any .po file is modified.

  • Extract messages from python files automatically or using a management command.

Requirements

  • python 2.7 or >= 3.2

  • django >= 1.6

Installation

$ pip install po-localization

Setup

Add 'po_localization' to your INSTALLED_APPS.

Settings

AUTO_RELOAD_TRANSLATIONS = settings.DEBUG
Whether translation files should be checked for modifications and reloaded before each request.
AUTO_UPDATE_TRANSLATIONS = False
Whether translation files should be automatically created or updated from python files when the server reloads.
UPDATE_TRANSLATIONS_APPS = ()
List of apps to update, using the same format as INSTALLED_APPS.
UPDATE_TRANSLATIONS_WITH_LOCATIONS = True
Whether translation files should include the locations of the extracted messages.
UPDATE_TRANSLATIONS_PRUNE_OBSOLETES = False
Whether obsolete translations should be pruned from translation files.
Empty translations will always be pruned.
Even if not pruned, obsolete translations will be marked as such with a comment.

Management Commands

update_translations

Extract messages from python files and create or update translation files.

Issues

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/kmichel/po-localization/issues .

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

po_localization-0.3.0.tar.gz (13.4 kB view hashes)

Uploaded Source

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