Ubuntu – Adding spelling dictionary to KDE applications

hunspellkdekubuntuspell-checking

How can I add language dictionaries to KDE apps? So far they only support some variants of English. There are hints that Hunspell could be used, but according to dpkg -l 'hunspell*', hunspell itself is not installed, while, curiously, hunspell-en-us is). Furthermore, the list of available language packages is small, and doesn't contain major languages such as Spanish or French.

The KDE handbook is a dead-end (broken link…)

Using Kubuntu 16.04

Best Answer

apt list --all-versions | grep hunspell is a convenient way to list the various languages available. You can then choose to install whatever you need.

apt list --all-versions | grep hunspell

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

hunspell/bionic 1.6.2-1 amd64
hunspell-af/bionic 1:6.0.3-3 all
hunspell-an/bionic 0.2-2 all
hunspell-ar/bionic 3.2-1 all
hunspell-be/bionic 0.53-3 all
hunspell-bg/bionic 1:6.0.3-3 all
hunspell-bn/bionic 1:6.0.3-3 all
hunspell-bo/bionic 0.4.0-1 all
hunspell-br/bionic 0.12-2 all
hunspell-bs/bionic 1:6.0.3-3 all
hunspell-ca/bionic 3.0.2+repack1-2 all
hunspell-cs/bionic 1:6.0.3-3 all
hunspell-da/bionic 1:6.0.3-3 all
hunspell-de-at/bionic 20161207-4 all
hunspell-de-at-frami/bionic 1:6.0.3-3 all
hunspell-de-ch/bionic 20161207-4 all
hunspell-de-ch-frami/bionic 1:6.0.3-3 all
hunspell-de-de/bionic 20161207-4 all
hunspell-de-de-frami/bionic 1:6.0.3-3 all
hunspell-de-med/bionic 20160103-1 all
hunspell-dz/bionic 0.1.0-1 all
hunspell-el/bionic 1:6.0.3-3 all
hunspell-en-au/bionic 1:2017.08.24 all
hunspell-en-ca/bionic 1:2017.08.24 all
hunspell-en-gb/bionic 1:6.0.3-3 all
hunspell-en-med/bionic 0.0.20080513-2 all
hunspell-en-us/bionic,now 1:2017.08.24 all [installed]
hunspell-en-za/bionic 1:6.0.3-3 all
hunspell-es/bionic 1:6.0.3-3 all
hunspell-eu/bionic 0.5.20151110-2 all
hunspell-eu-es/bionic 0.5.20151110-2 all
hunspell-fr/bionic 1:6.2-1 all
hunspell-fr-classical/bionic 1:6.2-1 all
hunspell-fr-comprehensive/bionic 1:6.2-1 all
hunspell-fr-modern/bionic 1:6.2-1 all
hunspell-fr-revised/bionic 1:6.2-1 all
hunspell-gd/bionic 1:6.0.3-3 all
hunspell-gl/bionic 1:6.0.3-3 all
hunspell-gl-es/bionic 13.10-1 all
hunspell-gu/bionic 1:6.0.3-3 all
hunspell-gug/bionic 1:6.0.3-3 all
hunspell-he/bionic 1:6.0.3-3 all
hunspell-hi/bionic 1:6.0.3-3 all
hunspell-hr/bionic 1:6.0.3-3 all
hunspell-hu/bionic 1:6.0.3-3 all
hunspell-is/bionic 1:6.0.3-3 all
hunspell-it/bionic 1:6.0.3-3 all
hunspell-kk/bionic 1.1-2 all
hunspell-kmr/bionic 1:6.0.3-3 all
hunspell-ko/bionic 0.7.1-1 all
hunspell-lo/bionic 1:6.0.3-3 all
hunspell-lt/bionic 1:6.0.3-3 all
hunspell-ml/bionic 0.1-2 all
hunspell-ne/bionic 1:6.0.3-3 all
hunspell-nl/bionic 2:2.10-6 all
hunspell-no/bionic 1:6.0.3-3 all
hunspell-oc/bionic 1:6.0.3-3 all
hunspell-pl/bionic 1:6.0.3-3 all
hunspell-pt-br/bionic 1:6.0.3-3 all
hunspell-pt-pt/bionic 1:6.0.3-3 all
hunspell-ro/bionic 1:6.0.3-3 all
hunspell-ru/bionic 1:6.0.3-3 all
hunspell-se/bionic 1.0~beta6.20081222-1.2 all
hunspell-si/bionic 1:6.0.3-3 all
hunspell-sk/bionic 1:6.0.3-3 all
hunspell-sl/bionic 1:6.0.3-3 all
hunspell-sr/bionic 1:6.0.3-3 all
hunspell-sv/bionic 1:6.0.3-3 all
hunspell-sw/bionic 1:6.0.3-3 all
hunspell-te/bionic 1:6.0.3-3 all
hunspell-th/bionic 1:6.0.3-3 all
hunspell-tools/bionic 1.6.2-1 amd64
hunspell-uk/bionic 1:6.0.3-3 all
hunspell-uz/bionic 0.6-4 all
hunspell-vi/bionic 1:6.0.3-3 all
libhunspell-1.6-0/bionic,now 1.6.2-1 amd64 [installed]
libhunspell-dev/bionic 1.6.2-1 amd64
libtext-hunspell-perl/bionic 2.11-1build4 amd64
python-hunspell/bionic 0.4.1-1build3 amd64
python3-hunspell/bionic 0.4.1-1build3 amd64

The reason why the list seen with dpkg -l 'hunspell*' is shorter is explained here:

$ dpkg -l 'hunspell*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-===================================================================
un  hunspell                        <none>               <none>               (no description available)
un  hunspell-ar                     <none>               <none>               (no description available)
un  hunspell-da                     <none>               <none>               (no description available)
un  hunspell-de-at                  <none>               <none>               (no description available)
un  hunspell-de-ch                  <none>               <none>               (no description available)
un  hunspell-de-de                  <none>               <none>               (no description available)
un  hunspell-dictionary             <none>               <none>               (no description available)
un  hunspell-dictionary-en          <none>               <none>               (no description available)
un  hunspell-dictionary-en-us       <none>               <none>               (no description available)
ii  hunspell-en-us                  1:2017.08.24         all                  English_american dictionary for hunspell
un  hunspell-eu-es                  <none>               <none>               (no description available)
un  hunspell-gl-es                  <none>               <none>               (no description available)
un  hunspell-kk                     <none>               <none>               (no description available)
un  hunspell-ko                     <none>               <none>               (no description available)
un  hunspell-se                     <none>               <none>               (no description available)
un  hunspell-uz                     <none>               <none>               (no description available)
$ 

But, in the output above, ii means that the package is installed whereas un means it hasn't been installed. un doesn't mean that the package is not available for installation. <none> below Version maybe confusing.

Here's more on the output of dpkg -l: What do the various dpkg flags like 'ii' 'rc' mean?.