kivy_garden.i18n
Internationalization support for Kivy applications.
from kivy_garden.i18n.localizer import MappingBasedTranslatorFactory, Localizer
translations = {
"greeting": {
"ja": "おはよう",
"en": "morning",
},
"app title": {
"ja": "初めてのKivyプログラム",
"en": "My First Kivy App",
},
}
localizer = Localizer(MappingBasedTranslatorFactory(translations))
l = localizer
l.lang = "en" # Set the "current language" to "en"
assert l.font_name == "Roboto"
assert l._("greeting") == "morning"
assert l._("app title") == "My First Kivy App"
l.lang = "ja"
assert l.font_name == "<a pre-installed Japanese font>"
assert l._("greeting") == "おはよう"
assert l._("app title") == "初めてのKivyプログラム"
Bindings:
from kivy.lang import Builder
localizer.install(name="l")
label = Builder.load_string("""
Label:
font_name: l.font_name
text: l._("greeting")
""")
localizer.lang = "en"
assert label.font_name == "Roboto"
assert label.text == "morning"
localizer.lang = "ja"
assert label.font_name == "<a pre-installed Japanese font>"
assert label.text == "おはよう"
Installation
Pin the minor version.
pip install "kivy-garden-i18n>=0.3,<0.4"
Tested on
- CPython 3.10 + Kivy 2.3
- CPython 3.11 + Kivy 2.3
- CPython 3.12 + Kivy 2.3
- CPython 3.13 + Kivy 2.3
Metadata
Release files for kivy-garden-i18n 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kivy_garden_i18n-0.3.0.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kivy_garden_i18n-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.8 kB
Release files / kivy_garden_i18n-0.3.0.tar.gz
| Download URL | kivy_garden_i18n-0.3.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86b50a19ef4a70aa5eb157d616b8d8e80bd31596f396cdc20ed58f5d525bef4d
|
|
BLAKE2b-256 checksum How to use checksums |
b3637ad6279062d6dd97ed0a58504da2e093a9164d87cec78d78fa6e31818fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency logRelease files / kivy_garden_i18n-0.3.0-py3-none-any.whl
| Download URL | kivy_garden_i18n-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8ec351c40e32d82915453413ea90e8ee248837c53b74ca24417b22cf9b6039b
|
|
BLAKE2b-256 checksum How to use checksums |
d46a1b0b0eb1114e60c79d7aa1767c5e3877c94036667f5ee95253657e08adad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency log