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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702003af8119a23afe688c3b9800366385244bcced977c998cd8d6db8b7c4cf4
|
|
| MD5 |
3b5339595a1bf29e1727276094e0a624
|
|
| BLAKE2b-256 |
505d0efc2ecf181e2fcbc2564bed9c83b5a8a527bbf0ada584a9460f7f4232e8
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5adf5a38c225437515b86d79c1e02db4f7287c097057b7bfb75060184c4b4214
|
|
| MD5 |
34ef4a8f462c8cd9c14ac4b49b0fdf89
|
|
| BLAKE2b-256 |
9111b095fb7579223640cf36f3cb000bfa258d1dd9a9e147677e02113b4c34bb
|