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.3.tar.gz (3.3 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pintl-0.1.3.tar.gz
  • Upload date:
  • Size: 3.3 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.3.tar.gz
Algorithm Hash digest
SHA256 702003af8119a23afe688c3b9800366385244bcced977c998cd8d6db8b7c4cf4
MD5 3b5339595a1bf29e1727276094e0a624
BLAKE2b-256 505d0efc2ecf181e2fcbc2564bed9c83b5a8a527bbf0ada584a9460f7f4232e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pintl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5adf5a38c225437515b86d79c1e02db4f7287c097057b7bfb75060184c4b4214
MD5 34ef4a8f462c8cd9c14ac4b49b0fdf89
BLAKE2b-256 9111b095fb7579223640cf36f3cb000bfa258d1dd9a9e147677e02113b4c34bb

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