VaniLite - Multi-Language Support for Your Project
Overview
VaniLite is a lightweight Python library designed to simplify the implementation of multi-language support in your projects. It provides a straightforward way to manage and retrieve localized strings, making your application accessible to users in different languages.
Features
-
Easy Integration: Simply import the VaniLite class into your project, and you're ready to start using multi-language support.
-
JSON and YAML Support: VaniLite supports both JSON and YAML formats for language files, giving you flexibility in how you structure your translations.
-
Dynamic String Retrieval: Retrieve localized strings with ease, including support for dynamic formatting with arguments.
Getting Started
-
Installation:
pip install VaniLite
-
Usage:
from VaniLite import VaniLite # Initialize VaniLite with optional parameters VaniLite = VaniLite(language="en_US") # Retrieve a localized string greeting = VaniLite.retrieve_string("hello", default_string="Hello, World!") # Use dynamic formatting formatted_greeting = VaniLite.retrieve_string("greet_with_name", default_string="Hello, {}!", "John")
-
Language Files:
Place your language files in the
/strings/directory. VaniLite supports both JSON and YAML files. For example, for English (en_US), you can haveen_US.jsonoren_US.yamlwith the translation key-value pairs. -
Changing Language Dynamically:
# Change the language dynamically VaniLite.reload_language("fr_FR")
License
This project is licensed under the GNU v3.0 License - see the LICENSE file for details.
Happy coding with multi-language support using VaniLite!
Metadata
Release files for VaniLite 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| VaniLite-0.0.2.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| VaniLite-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.3 kB
Release files / VaniLite-0.0.2.tar.gz
| Download URL | VaniLite-0.0.2.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ad97ea8a61f8f3c7c80b97c13301558cb1ec1107da88262747f6ad5304401f6
|
|
BLAKE2b-256 checksum How to use checksums |
433c50aa19851d83431721efe950f5a3c0953f4d0150a0b4aa76fa1b028224dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / VaniLite-0.0.2-py3-none-any.whl
| Download URL | VaniLite-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e741b41282e3c61fb2955bb96b589d7be92e73ecca760bcf56ca0bea0133d30
|
|
BLAKE2b-256 checksum How to use checksums |
0e0a32582b0bd4d1bc070fbbcae5e876ec4d227f810560c313a9279b0d7e380b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|