Skip to main content

A Python internationalization package

Project description

PIntl

PIntl is a localization package heavily inspired by the Flutter's "intl" package. The localization files are in ".arb" format (basically json), one file per language in a single folder.

Usage

To use PIntl, first initialize the localization

PIntl.load("tests/l10n") or if you need per instance localization, like in web service pintl = PIntl.load("tests/l10n")

and set the locale: set_locale("fi") or pintl.set_locale("fi")

To get the string, simply call global string function (uses last created instance) with optional parameter dictionary: _("my_localized_string", {"param1",123})

or equivalent instance method _("my_localized_string", {"param1",123})

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

pintl-0.1.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pintl-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pintl-0.1.4.tar.gz.

File metadata

  • Download URL: pintl-0.1.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for pintl-0.1.4.tar.gz
Algorithm Hash digest
SHA256 45963674f176b456552abe1a2329385cee42d7a22389fe00e3eed9d3fd9f718b
MD5 dc27b643b8797ac6293735d303eab026
BLAKE2b-256 0f5e5a4c9236e9e948d0d6055ba9c4a4df2d63ae60d3e4ad335fb9aab090e92a

See more details on using hashes here.

File details

Details for the file pintl-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pintl-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for pintl-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 857dc6c696dd3c5efd0554901dfc74934c2e7890bf07e0bba92c462e6c8d55f5
MD5 435064353fcebbdc1dafe7853774ad57
BLAKE2b-256 1f853d065399917b9435c93439f6f271eca2d737560fe7b32b3383bd915558f2

See more details on using hashes here.

Supported by

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