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

Uploaded Source

Built Distribution

langtable-0.0.67-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langtable-0.0.67.tar.gz
Algorithm Hash digest
SHA256 04c81012b5a9f018567a480bff0b7228e8db95e86fea0eb3d45894d8b8b80e64
MD5 eeca574dcd87f11b94c9932904eb996e
BLAKE2b-256 231fcb3d88d61cfdd9f422126c7aef836498bde49b7f70074d190423e83281ef

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for langtable-0.0.67-py3-none-any.whl
Algorithm Hash digest
SHA256 fb3c3ddae8acc3e26fee0830bae6e1764ad0a5e0365f7bb118f5919bacd03c86
MD5 0288fb2cf93c584d5832c18e85d057da
BLAKE2b-256 9f4a3c9cff076e9629a4be89b14fa5c36e517b91423f2ba869dddde566b744e4

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