Skip to main content

Localization helpers

Project description

Forrin localization helpers

The goal of this project is to, eventually, provide i18n/L10n support for Python programs, complete with automatic conjguation, declension, and other word-morphing shenanigans in messages – preferably for all languages in the world.

The Translator class wraps gettext’s C-like API as one callable object, to be subclassed and instantiated in every module, and usually aliased to _.

Extraction methods are provided to detects calls to the _ function and store them in a POT file; the extractors will also play nicely with Babel’s setuptools hooks if you should choose to go in that direction.

When a traslated message begins with the “@” symbol, it becomes a Template, a unicode subclass which can do language-specific magic in its format() method.

Forrin uses UTF-8 exclusively.

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

forrin-0.1-alpha.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file forrin-0.1-alpha.tar.gz.

File metadata

  • Download URL: forrin-0.1-alpha.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for forrin-0.1-alpha.tar.gz
Algorithm Hash digest
SHA256 0fa0869e62597a0baca34e9377b8c003593705c954e9514c4965ae90568a7ff8
MD5 ea6d5fe93345f53fb6ae8f3bf1ee04aa
BLAKE2b-256 a3128e0818bb67d72330e174c9017825bd62337168f12393b27fa993948e8abb

See more details on using hashes here.

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