Fix override for fr-CA
[cldr2json.git] / README.mdwn
blob0eb54bcae644ab102d33c5252cd88864d1d2fbe3
1 cldr2json
2 =========
4 This script converts Unicode CLDR android keyboard layouts to JSON usable by
5 GNOME Shell.
7 CLDR keyboard layouts can be found at
8 <http://www.unicode.org/Public/cldr/latest/keyboards.zip>
11 Usage
12 =====
14     ./cldr2json <input file or directory> <output directory>
16 example:
18     ./cldr2json cldr/keyboards/android/ json_layouts/
21 Keyboard layout mapping
22 =======================
24 Unicode CLDR layout identifiers are language codes, while XKB layout
25 identifiers are... something else. The mapping between the two currently uses
26 heuristic based on the layout descriptions, in this order:
28 - if the CLDR layout description matches an XKB layout description, chose its
29   XKB identifier
30 - if one word of the CLDR layout description matches an XKB layout
31   description, chose its XKB identifier
32 - if the CLDR layout description matches one word of an XKB layout description,
33   chose its XKB identifier
35 That doesn't always work. For instance it fails for "en" language, that should
36 match "us" XKB identifier. For such cases, there is a mapping in
37 LOCALE_TO_XKB_OVERRIDES at the top of the script. If you discover a weird
38 mapping of if you get a "failed to find XKB mapping for <locale>" warning then
39 please consider adding an override there.