Skip to content
CleverKeys Wiki

Language Packs

Add language dictionaries and layouts by importing language pack files.

Quick Summary

WhatDescription
PurposeAdd language support
AccessSettings > Activities > Backup & Restore > Import
ContentsDictionary, contractions, layouts

What’s in a Language Pack

Each language pack includes:

ComponentDescription
DictionaryBinary word list for predictions
ContractionsLanguage-specific contractions (if available)
LayoutKeyboard layout with special keys

Bundled Languages

CleverKeys includes English by default. The following dictionaries are bundled in the app:

  • English (US) - default
  • Additional layouts available via import

Importing Language Packs

Step 1: Obtain the Language Pack

Language packs are .zip files you can:

  • Build yourself using the provided scripts
  • Obtain from community resources

Step 2: Import via Backup & Restore

  1. Open Settings
  2. Go to Activities > Backup & Restore
  3. Select Import
  4. Choose the language pack .zip file
  5. The pack is extracted and installed

Step 3: Configure Language

After import:

  1. The new layout appears in Layout Manager
  2. Dictionary is automatically loaded for predictions
  3. Configure in Settings > Activities > Layout Manager

Building Custom Language Packs

For languages not bundled, you can create your own using the provided Python scripts:

Requirements

  • Python 3.x
  • wordfreq package (optional, for frequency data)

Using Build Scripts

# Navigate to scripts directory
cd scripts/

# Install prerequisite
pip install wordfreq

# Option 1: Two-step build from wordfreq (any language wordfreq supports)
python get_wordlist.py --lang sv --output sv_words.txt --count 50000
python build_langpack.py --lang sv --name "Swedish" --input sv_words.txt --use-wordfreq --output langpack-sv.zip

# Option 2: Build from pre-existing binary dictionary (.bin file)
python build_langpack.py --lang sv --name "Swedish" --dict ../src/main/assets/dictionaries/sv_enhanced.bin --output langpack-sv.zip

# Option 3: Build from custom word list CSV (format: word,frequency per line)
python build_dictionary.py --input my_words.csv --output custom.bin
python build_langpack.py --lang xx --name "MyLang" --dict custom.bin --output langpack-xx.zip

Scripts Available

ScriptPurpose
build_langpack.pyCreate .zip language pack from wordfreq
build_dictionary.pyBuild binary dictionary from CSV
build_all_languages.pyBatch build all supported languages
get_wordlist.pyExtract top N words from wordfreq

Language Pack Structure

langpack-{lang}.zip
├── {lang}_enhanced.bin    # Binary dictionary
├── {lang}_enhanced.json   # Human-readable word list
├── contractions.json      # Language contractions (optional)
└── manifest.json          # Metadata

Languages Supported by wordfreq

Languages available through the wordfreq Python package:

  • European: Swedish (sv), Norwegian (nb), Danish (da), Finnish (fi), Polish (pl), Czech (cs), German (de), French (fr), Spanish (es), Italian (it), Portuguese (pt)
  • Asian: Japanese (ja), Korean (ko), Chinese (zh)
  • Other: Russian (ru), Arabic (ar), Hebrew (he), Hindi (hi), Turkish (tr)

Managing Language Packs

View Installed

  1. Go to Settings > Activities > Layout Manager
  2. Installed layouts show available languages

Remove a Language Pack

  1. Delete the language files from the app’s internal storage
  2. Or use Backup & Restore to reset to defaults

Offline Operation

Once imported, all language features work offline:

FeatureWorks Offline
Typing
Predictions
Autocorrect
Contractions

Tips and Tricks

  • Start with English: English is fully bundled and ready to use
  • Build for your language: Use the scripts to create packs for unsupported languages
  • Share packs: Language pack files can be shared with other users
  • Backup first: Export your settings before major imports

Common Questions

Q: How do I add a new language?

A: Build a language pack using the provided Python scripts, then import it via Settings > Activities > Backup & Restore.

Q: Can I use a language without importing a pack?

A: Basic typing works with any layout, but predictions and autocorrect require a dictionary.

Q: Why is my language not available?

A: Build it yourself using the build_langpack.py script with the wordfreq package.

Q: Do I need to download English?

A: No, English is included by default.

Technical Details

See Language Packs Technical Specification.