Skip to main content

guess reasonable defaults for locale, keyboard, territory, ...

Project description

Purpose of this package

langtable is used to guess reasonable defaults for locale, keyboard, territory, …, if part of that information is already known. For example, guess the territory and the keyboard layout if the language is known or guess the language and keyboard layout if the territory is already known.

License

GPLv3+, see the included file “COPYING”.

Translations for languages and territory names are from CLDR which is governed by the Unicode Terms of Use, see the included file “unicode-license.txt”. The short name for this Unicode license is “MIT”. See:

https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_without_sublicense_.28Unicode.29

Installation

To install langtable, run

make install DESTDIR=/usr

To create a distribution tarball run

make dist

To run the test cases in the source directory:

make test-local

To run the test cases using the installed files:

make install DESTDIR=/usr make test DESTDIR=/usr

How to use it

import langtable

Functions in the public API:

parse_locale() list_locales() list_keyboards() list_common_languages() list_common_keyboards() list_consolefonts() list_inputmethods() list_timezones() list_scripts() language_name() territory_name() timezone_name() languageId() territoryId() supports_ascii()

Some examples to show the usage are found in the documentation of the public functions in langtable.py.

(Some more examples are in the test cases in the file test_cases.py):

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

langtable-0.0.63.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

langtable-0.0.63-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file langtable-0.0.63.tar.gz.

File metadata

  • Download URL: langtable-0.0.63.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for langtable-0.0.63.tar.gz
Algorithm Hash digest
SHA256 ff2b5a1db27900cb83e06bcbd14cb0bbd5caaf304c913308246608d8e93d684f
MD5 c06bc1bf29fbb2ed44cb73f7ed3df9dc
BLAKE2b-256 d03417748df1de8d9f3ee107f1bb69697cf2a4d246eeb8ded6f93b520dbd1da5

See more details on using hashes here.

File details

Details for the file langtable-0.0.63-py3-none-any.whl.

File metadata

  • Download URL: langtable-0.0.63-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for langtable-0.0.63-py3-none-any.whl
Algorithm Hash digest
SHA256 d7e3559f32bb8ae229e2def3dd781c634dda091bc48a5426e74eb89e7daf78b3
MD5 75d0a0bd60f7a30d7a1544722cc712d0
BLAKE2b-256 0b8e1c3c2c7c3ff133f25c0e446a7394e33509af07a65c527a2500da3ca53309

See more details on using hashes here.

Supported by

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