You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

python-gettext-translations

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-gettext-translations

Python gettext translations

1.1.0
pipPyPI
Maintainers
1

Usage

  • Place your translation files in the directory tree structured as below: .. code-block:: console

    i18n/en_GB/messages.po i18n/fr_FR/messages.po

  • 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")

  • 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:

  • Update sphinx_integral_theme/init.py with new version and version_info

  • Run the following command: .. code-block:: console

    (.venv) $ flit publish

Keywords

translations

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts