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

Uploaded Python 3

File details

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

File metadata

  • Download URL: locale_simple-0.100.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.100.tar.gz
Algorithm Hash digest
SHA256 8c43b28a03fd1b90ce9d8360b20a26fe37af21ac98bdf7a856e06d338a40df8f
MD5 41cc12ab0c5f7952566380d8de35258e
BLAKE2b-256 582fa8199b843c25002e38d3d68a32b3da92b9c1718a39e7b68a5c71534e3ec4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: locale_simple-0.100-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.100-py3-none-any.whl
Algorithm Hash digest
SHA256 b71889b51d93ae5b1826efba5f6cbc02cd1fa6bfd0c476a61f054824556211ae
MD5 07ebef809c3e0f37734b772c85b20bff
BLAKE2b-256 05477c994724270a03a67f15e7907fc6e3d202c7f18ed1787d5d1d17a20c0e23

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