Skip to main content

Translation system based on gettext, same API in Perl, Python and JavaScript

Project description

Description

This is a small wrapper around Gettext functionality that integrates sprintf and makes it a bit more easy to setup the internationalization. It ONLY supports UTF8 data, and in or output, that is a fixed setup (and always will be).

Usage

Usage of this module is very similar to that of Locale::Simple:

from locale_simple import *

# Set the locale dir
l_dir('data/locale')
# Set the default domain
ltd('test')
# Set the default language
l_lang('de_DE')

print l("Hello") # Hallo
print ln("You have %d message","You have %d messages",1) # Du hast 1 Nachricht

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

locale_simple-0.102.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

locale_simple-0.102-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file locale_simple-0.102.tar.gz.

File metadata

  • Download URL: locale_simple-0.102.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for locale_simple-0.102.tar.gz
Algorithm Hash digest
SHA256 9ac24e7cb05a85bc2b2e0e2f10787abc1350b7a205b98d782a846ee2430e3615
MD5 dbe7257005498c8e6dcd82583b073d63
BLAKE2b-256 283dcc416df30d536142a8a1c6b344384f171bd2f4a58cf0df1787090cc34327

See more details on using hashes here.

File details

Details for the file locale_simple-0.102-py3-none-any.whl.

File metadata

  • Download URL: locale_simple-0.102-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for locale_simple-0.102-py3-none-any.whl
Algorithm Hash digest
SHA256 02907d8f0bf1f6258cff17562d4365a0d40e7491b4e2f7a59da51146d08c0721
MD5 695fbafd93506d493aa75161dbfc823d
BLAKE2b-256 13076dfd387911f4144b6ee6e527bf403c3ddac4080f141adbe949eb75bd5581

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page