Debian Codegraph @

README.md

raw
1 # langtable
2
3 [![PyPI version](https://badge.fury.io/py/langtable.svg)](https://badge.fury.io/py/langtable)
4
5 Guessing reasonable defaults for locale, keyboard layout, territory, and language.
6
7 ## Purpose of this package
8 _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.
9
10 ## License
11
12 GPLv3+, see the included file “COPYING”.
13
14 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:
15
16 https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_without_sublicense_.28Unicode.29
17
18 ## Installation
19
20 To install langtable, run
21
22 ```
23 make install DESTDIR=/usr
24 ```
25
26 To create a distribution tarball run
27 ```
28 make dist
29 ```
30 To run the test cases in the source directory:
31 ```
32 make check
33 ```
34
35 ## How to use it
36
37 ```
38 import langtable
39 ```
40
41 Functions in the public API:
42
43 ```
44 parse_locale()
45 list_locales()
46 list_keyboards()
47 list_common_languages()
48 list_common_locales()
49 list_common_keyboards()
50 list_consolefonts()
51 list_inputmethods()
52 list_timezones()
53 list_scripts()
54 language_name()
55 territory_name()
56 timezone_name()
57 languageId()
58 territoryId()
59 supports_ascii()
60 list_all_languages()
61 list_all_locales()
62 list_all_keyboards()
63 list_all_territories()
64 list_all_timezones()
65 list_all_scripts()
66 list_all_input_methods()
67 list_all_console_fonts()
68 ```
69
70 Some examples to show the usage are found in the documentation of the public functions in `langtable.py`.
71
72 Some more examples are in the test cases in the file `test_cases.py`.