| ci |
|
|---|---|
| pypi |
|
| qa |
|
tkinter-msgcat
Create multilingual interfaces for your tkinter applications.
tkinter-msgcat leverages Tk's msgcat to provide a per-instance message catalog which holds all the translations, while allowing them to be kept in separate files away from code.
⏬ Installation
tkinter-msgcat requires Python 3.7+
pip install tkinter-msgcat
✨ Getting Started
-
For storing the translation files I recommend this folder hierarchy:
project (or src/project) ├── __init__.py └── msgs ├── __init__.py ├── hi.msg └── mr.msgThis layout is recommended by Tcl.
-
Add some translations in the
.msgfiles, in this casehi.msg:::msgcat::mcset hi "Hello" "नमस्ते"
-
Create a Tkinter window or instance, technically.
-
Let's put tkinter-msgcat into action!
from pathlib import Path from tkmsgcat import * msgsdir = Path(__file__).parent / "msgs" load(msgsdir) locale("hi") get("Hello") # "नमस्ते" 🥳
🤝 Contributing
All contributions are welcome and acknowledged. Please read the contributor's guide.
© License
The code in this project is released under the 3-Clause BSD License.
Metadata
Release files for tkinter-msgcat 0.1.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 | Provenance | |
|---|---|---|---|---|
| tkinter_msgcat-0.1.0.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tkinter_msgcat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / tkinter_msgcat-0.1.0.tar.gz
| Download URL | tkinter_msgcat-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
817e010688245b4d9edee1322ccb3ee70b9444a59814434bc421fa4cdbb9ca67
|
|
BLAKE2b-256 checksum How to use checksums |
19a7405483695fc8113acb47ab675064ed751f1bf2f7a92618bf567904f96709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.11.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / tkinter_msgcat-0.1.0-py3-none-any.whl
| Download URL | tkinter_msgcat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5616e4ba83a5c5751b7c68ca4cef77651ac85566955106b99d3f06e6f6f30fd9
|
|
BLAKE2b-256 checksum How to use checksums |
34d6b20db654ce69aa1ec249691bdc35f6d09054357e35f4813fe4e80352431f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.11.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for tkinter-msgcat 0.1.0
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.