Internationalization library for comfortable usage
Project description
Internationalization.py
Provides simple and powerful i18n realization
Installation
With pip
pip install internationalization.py
Via Git
git clone https://github.com/cortelf/internationalization.py
cd internationalization.py
python setup.py install
Usage
Create directory for yaml files
mkdir yourdirectory
Write your yaml files
You can use .yml or .yaml file extensions
yourappdomain.en.yml
hello_world: Hello World!
yourappdomain.it.yml
hello_world: Ciao mondo!
In root of your app initialize singleton
from internationalization import Localization
localization = Localization("yourappdomain", "yourdirectory")
localization.initialize()
It's ready to use in any place
from internationalization import Localization
localization = Localization("yourappdomain", "yourdirectory")
english = localization.get_language("en")
italian = localization.get_language("it")
print("English:", english.hello_world)
print("Italian:", italian.hello_world)
Project details
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
Close
Hashes for internationalization.py-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb934d0afdcb4e3f61a8b94cd554a85ab1dee64bce2a9408432d7d4038027a38 |
|
MD5 | 18d9c8eab0acf200cc8588e3b09ea989 |
|
BLAKE2b-256 | 88fa0bdf1baf7c364d32717b8a1d667222ad7d97912d939c95cfebfd154edddc |
Close
Hashes for internationalization.py-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0366079d66258f2e9fddff251b213b2a6fc9ec7b4b3b8f58d3bde2530c6cab3f |
|
MD5 | 1acbe37a6a4e6dba19c81a7f95af5039 |
|
BLAKE2b-256 | ac3cdeec094a58ef753f843b5dac7c0ed4f6eef9bd93272f42eec670484e293c |