Skip to main content

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

Project description

langtable

PyPI version

Guessing reasonable defaults for locale, keyboard layout, territory, and language.

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 check

How to use it

import langtable

Functions in the public API:

     parse_locale()
     list_locales()
     list_keyboards()
     list_common_languages()
     list_common_locales()
     list_common_keyboards()
     list_consolefonts()
     list_inputmethods()
     list_timezones()
     list_scripts()
     language_name()
     territory_name()
     timezone_name()
     languageId()
     territoryId()
     supports_ascii()
     list_all_languages()
     list_all_locales()
     list_all_keyboards()
     list_all_territories()
     list_all_timezones()
     list_all_scripts()
     list_all_input_methods()
     list_all_console_fonts()

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.71.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

langtable-0.0.71-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langtable-0.0.71.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for langtable-0.0.71.tar.gz
Algorithm Hash digest
SHA256 f9d39c06d5182ea14eb4576bf1da8875af1d44efb166e55d6865b3b59b8ac617
MD5 c1f3c381b86cc930cff4fb37275dcc03
BLAKE2b-256 5b0038ddba0c45ef10d801cdb341841f518c5b6943a33a00ad4d8adfe3bc9d30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langtable-0.0.71-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for langtable-0.0.71-py3-none-any.whl
Algorithm Hash digest
SHA256 35bfe8c9de1399c9f36f40c7e96050d6818ddeb19866d966e3401b360c02cffa
MD5 2401c3f2133b0f73603ca0789bcd3a44
BLAKE2b-256 a72ac4663fee4c3d842d8d7844feaba1231e336ff47aaa11803a1a267070ac0c

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