Python gettext translations
Project description
1. Place your translation files in the directory tree structured as below: .. code-block:: console
i18n/en_GB/messages.po i18n/fr_FR/messages.po
2. Load the translation strings: .. code-block:: python
from translations import init_translations dir_path = os.path.dirname(os.path.realpath(__file__)) init_translations(dir_path + “/i18n”)
3. Get translation string: .. code-block:: python
from translations import translate translate(“de_DE”, “Hello, %user%”, {“user”: “Alexey”}) # Prints “Hello, Alexey”
New version release
To release new version: 1. Update sphinx_integral_theme/__init__.py with new __version__ and __version_info__ 2. Run the following command: .. code-block:: console
(.venv) $ flit publish
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_gettext_translations-1.1.0.tar.gz.
File metadata
- Download URL: python_gettext_translations-1.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54ba5a380e916411e454254f59e232e42e63a43f88c5b6329e196a185dd08fb
|
|
| MD5 |
0c8bae946ea7855ba3c1df6e8dd9bd39
|
|
| BLAKE2b-256 |
01c03e881d7b44282a8db0d191e2c6dd08ca8370a381dd763e507e3cd5907066
|
File details
Details for the file python_gettext_translations-1.1.0-py3-none-any.whl.
File metadata
- Download URL: python_gettext_translations-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2533ffac05bd13143a7a9d3352fc93ce1b46b949ed95a5e74e4d579208cf4185
|
|
| MD5 |
fbab6436f425ffac3b98c6f62886d5a7
|
|
| BLAKE2b-256 |
ab46142f18b38cbde7c66c53993064bd3b6b3c0e759fe5ffabdc92602f5c6af3
|