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.103.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.103-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: locale_simple-0.103.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.103.tar.gz
Algorithm Hash digest
SHA256 3cf43176760437b27db92aa9eea6fb9df0d2dc63f15faad2fda6a667bda1f869
MD5 aab7f075251493a289e7b52014c26618
BLAKE2b-256 5b505a8cee781395d00ce5424eba12bca5f721a349e2f6e8eab1547f19b3fabe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: locale_simple-0.103-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.103-py3-none-any.whl
Algorithm Hash digest
SHA256 33c512187dc6bec81b67d2ba5b8a6fa9f76b70b89b2e7a03172100fe05c0c447
MD5 4674554a70113cb8caf6ef2cc6980abb
BLAKE2b-256 fef9f7cb3ef95062761d9e63f92235ec37da5099b7ddd748dd0f5f80f37c00ee

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