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.70.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.70-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langtable-0.0.70.tar.gz
Algorithm Hash digest
SHA256 725b94121856a3b76d2345e8596954b82ed1eda78513e55ac55fbe4a4823e66e
MD5 2f9e95f074eacfb87898f610c2dd6912
BLAKE2b-256 0670a39fa270f8102ec64d0221b09fab2c916c694ba1979f6b2d526587bf2820

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langtable-0.0.70-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.2

File hashes

Hashes for langtable-0.0.70-py3-none-any.whl
Algorithm Hash digest
SHA256 da53548065ffe6f7caf26b12097486d48b7ee660d012bf2148d454a1f3e5598a
MD5 bfd6745e9b202e69f111212d39ac9835
BLAKE2b-256 27b667277b2164f7cee1f6be347d8bbb91d683ae8ab4512bf75c04a2c950c8d1

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