Skip to main content

Usage

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

Metadata

Release files for python-gettext-translations 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-gettext-translations 1.1.0
File Size Uploaded
python_gettext_translations-1.1.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gettext-translations 1.1.0
File Interpreter ABI Platform
python_gettext_translations-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.5 kB

Release files / python_gettext_translations-1.1.0.tar.gz

Download URL python_gettext_translations-1.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d54ba5a380e916411e454254f59e232e42e63a43f88c5b6329e196a185dd08fb
BLAKE2b-256 checksum
How to use checksums
01c03e881d7b44282a8db0d191e2c6dd08ca8370a381dd763e507e3cd5907066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / python_gettext_translations-1.1.0-py3-none-any.whl

Download URL python_gettext_translations-1.1.0-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2533ffac05bd13143a7a9d3352fc93ce1b46b949ed95a5e74e4d579208cf4185
BLAKE2b-256 checksum
How to use checksums
ab46142f18b38cbde7c66c53993064bd3b6b3c0e759fe5ffabdc92602f5c6af3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page