From 77c4a27c4c37b3620defcab94ffd1b2f536c88cb Mon Sep 17 00:00:00 2001
From: Jules Aguillon
Date: Mon, 2 Feb 2026 00:20:00 +0100
Subject: Spell checking (#1137)
This adds dictionary-based spell checking to the keyboard. The keyboard looks at the word being typed and matches it against a dictionary to either complete the rest of the word or find alternative spellings.
The core of this feature is implemented in cdict, which is included as a
submodule in vendor/cidct.
Cdict is developped at https://github.com/Julow/cdict
The dictionaries are hosted at https://github.com/Julow/Unexpected-Keyboard-dictionaries/
The wordlists used to build the dictionaries are the same ones used by
HeliBoard from https://codeberg.org/Helium314/aosp-dictionaries
- Add an activity accessible from the launcher app that lists available
dictionaries with a download button.
The DictionaryListView view shows the list of available dictionaries and
handles downloading and installing them.
- The Dictionaries class manages installed dictionaries. Dictionaries are
installed as individual files into the app's private directory.
- Available dictionaries are listed in dictionaries.xml, which is generated
when building Unexpected-Keyboard-dictionaries.
method.xml mentions the dictionary name for each locales.
---
res/values/dictionaries.xml | 237 ++++++++++++++++++++++++++++++++++++++++++++
res/values/strings.xml | 4 +
res/values/styles.xml | 33 +++++-
3 files changed, 273 insertions(+), 1 deletion(-)
create mode 100644 res/values/dictionaries.xml
(limited to 'res/values')
diff --git a/res/values/dictionaries.xml b/res/values/dictionaries.xml
new file mode 100644
index 0000000..f3e73fd
--- /dev/null
+++ b/res/values/dictionaries.xml
@@ -0,0 +1,237 @@
+
+
+ Arabic
+ Assamese
+ Belarusian
+ Bulgarian
+ Bangla
+ Bosnian
+ Catalan
+ Czech
+ Danish
+ German
+ German (Switzerland)
+ Greek
+ English (Australia)
+ English (United Kingdom)
+ English (United States)
+ Spanish
+ Basque
+ Finnish
+ French
+ Galician
+ Gujarati
+ Hindi
+ Croatian
+ Hungarian
+ Armenian
+ Italian
+ Hebrew
+ Georgian
+ Khmer
+ Kannada
+ Luxembourgish
+ Lithuanian
+ Latvian
+ Maithili
+ Malayalam
+ Marathi
+ Norwegian Bokmål
+ Dutch
+ Odia
+ Punjabi
+ Polish
+ Portuguese (Brazil)
+ Portuguese (Portugal)
+ Romanian
+ Russian
+ Sanskrit
+ Santali
+ Sindhi
+ Slovenian
+ Serbian
+ Swedish
+ Tamil
+ Telugu
+ Turkish
+ Ukrainian
+ Urdu
+ Standard Moroccan Tamazight
+
+ - ar
+ - as
+ - be
+ - bg
+ - bn
+ - bs
+ - ca
+ - cs
+ - da
+ - de
+ - de_CH
+ - el
+ - en_AU
+ - en_GB
+ - en_US
+ - es
+ - eu
+ - fi
+ - fr
+ - gl
+ - gu
+ - hi
+ - hr
+ - hu
+ - hy
+ - it
+ - iw
+ - ka
+ - km
+ - kn
+ - lb
+ - lt
+ - lv
+ - mai
+ - ml
+ - mr
+ - nb
+ - nl
+ - or
+ - pa
+ - pl
+ - pt_BR
+ - pt_PT
+ - ro
+ - ru
+ - sa
+ - sat
+ - sd
+ - sl
+ - sr
+ - sv
+ - ta
+ - te
+ - tr
+ - uk
+ - ur
+ - zgh
+
+
+ - @string/dict_name_ar
+ - @string/dict_name_as
+ - @string/dict_name_be
+ - @string/dict_name_bg
+ - @string/dict_name_bn
+ - @string/dict_name_bs
+ - @string/dict_name_ca
+ - @string/dict_name_cs
+ - @string/dict_name_da
+ - @string/dict_name_de
+ - @string/dict_name_de_ch
+ - @string/dict_name_el
+ - @string/dict_name_en_au
+ - @string/dict_name_en_gb
+ - @string/dict_name_en_us
+ - @string/dict_name_es
+ - @string/dict_name_eu
+ - @string/dict_name_fi
+ - @string/dict_name_fr
+ - @string/dict_name_gl
+ - @string/dict_name_gu
+ - @string/dict_name_hi
+ - @string/dict_name_hr
+ - @string/dict_name_hu
+ - @string/dict_name_hy
+ - @string/dict_name_it
+ - @string/dict_name_iw
+ - @string/dict_name_ka
+ - @string/dict_name_km
+ - @string/dict_name_kn
+ - @string/dict_name_lb
+ - @string/dict_name_lt
+ - @string/dict_name_lv
+ - @string/dict_name_mai
+ - @string/dict_name_ml
+ - @string/dict_name_mr
+ - @string/dict_name_nb
+ - @string/dict_name_nl
+ - @string/dict_name_or
+ - @string/dict_name_pa
+ - @string/dict_name_pl
+ - @string/dict_name_pt_br
+ - @string/dict_name_pt_pt
+ - @string/dict_name_ro
+ - @string/dict_name_ru
+ - @string/dict_name_sa
+ - @string/dict_name_sat
+ - @string/dict_name_sd
+ - @string/dict_name_sl
+ - @string/dict_name_sr
+ - @string/dict_name_sv
+ - @string/dict_name_ta
+ - @string/dict_name_te
+ - @string/dict_name_tr
+ - @string/dict_name_uk
+ - @string/dict_name_ur
+ - @string/dict_name_zgh
+
+
+ - 455658
+ - 307451
+ - 1745968
+ - 347735
+ - 301586
+ - 481783
+ - 335099
+ - 657214
+ - 933060
+ - 1071580
+ - 1075177
+ - 964195
+ - 645068
+ - 644719
+ - 650605
+ - 635119
+ - 359849
+ - 1003794
+ - 871636
+ - 240926
+ - 279333
+ - 301928
+ - 727487
+ - 331818
+ - 948362
+ - 696974
+ - 352933
+ - 488139
+ - 263411
+ - 286588
+ - 331897
+ - 736799
+ - 854603
+ - 333644
+ - 354875
+ - 301259
+ - 776481
+ - 926933
+ - 357107
+ - 107120
+ - 740895
+ - 705536
+ - 996904
+ - 1421447
+ - 907625
+ - 342293
+ - 322250
+ - 256078
+ - 228729
+ - 740293
+ - 916845
+ - 297338
+ - 304295
+ - 690598
+ - 1179318
+ - 265324
+ - 628168
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e01e98f..d46b828 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -108,6 +108,7 @@
Send
Enable keyboard
Select keyboard
+ Install dictionaries
This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.
This is a free and open source application. You can find the source code or report bugs on GitHub.
After enabling, you can try the keyboard here:
@@ -154,6 +155,9 @@
At most 30 minutes
Until the app stops
Custom definition
+ Download a dictionary from the Internet
+ Dictionary installed
+ Download failed
No dictionary installed
Install
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 5defb7b..6977e00 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -64,7 +64,7 @@
- fill_parent
- wrap_content
- 8dp
- - 16dp
+ - 24dp
- center
+
+
+
+
+
+