Skip to main content

zi-i18n

A Experimental Internationalization

example:

Translation

#in "example.py" file
from zi_i18n import I18n

i18n = I18n("locale", "en_US")
print(i18n.translate("example.text"))

#in "locale/en_US.zi.lang" file
<!example.text: "Test">
#output: Test

Pluralization

#in "example.py" file
from zi_i18n import I18n

i18n = I18n("locale", "en_US")
print(i18n.translate("example.plural", count=0))
print(i18n.translate("example.plural", count=1))
print(i18n.translate("example.plural", count=5))

#in "locale/en_US.zi.lang" file
<%example.plural: {"zero": "0", "one": "1", "many": ">= 2"}
#output:
# 0
# 1
# >= 2

Metadata

Release files for zi-i18n 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zi-i18n 0.0.8
File Size Uploaded Provenance Actions
zi-i18n-0.0.8.tar.gz 3.9 kB Without provenance Details for zi-i18n-0.0.8.tar.gz

Release files / zi-i18n-0.0.8.tar.gz

Download URL zi-i18n-0.0.8.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
56defe95da4fd40d853ef0383631d33a422af88337d6179cb442aac7418a9e56
BLAKE2b-256 checksum
How to use checksums
aa76fba529a4427df4c51b299a4b0554a27aed5e7f20efe1d5067cf30ba6033b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

Security for zi-i18n 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page