Spell checking multiple languages

Hello!
I have Fedora Workstation 39 installation, UI language is set to English, but I’m using alternate language too.
Applications like gnome-text-editor performs spell checking, but only for English language.
looks like enchant package is used, and ‘~$ enchant-lsmod-2’ command returns
‘hunspell (Hunspell Provider)’ output. So, looks like it backed by hunspell.
‘hunspell -d’ returns a bunch of languages, but ‘LOADED DICTIONARY:’ is only ‘/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic’
How to add secondary language so It will be possible to have multiple language spellchecking?
Thank you!

1 Like

Run dnf list hunspell\* and you see a list of packages you can install. Select one that matches you desired language and install it.

1 Like

I already have needed hunspell-* package installed, but it seems not be loaded.

Post some screenshots.

Your editor may also have configuration settings for selecting the language for spell checking.

For gnome-text-editor you select the locale definitions, for exampe run LC_ALL=de_DE gnome-text-editor.

I hope this code will be the same:

username@fedora:~$ enchant-lsmod-2 
hunspell (Hunspell Provider)
username@fedora:~$ hunspell -D
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/pchmykh/.openoffice.org/3/user/wordbook:/home/pchmykh/.openoffice.org2/user/wordbook:/home/pchmykh/.openoffice.org2.0/user/wordbook:/home/pchmykh/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/usr/share/hunspell/en_GB
/usr/share/hunspell/en_AG
/usr/share/hunspell/en_AU
/usr/share/hunspell/en_BS
/usr/share/hunspell/en_BW
/usr/share/hunspell/en_BZ
/usr/share/hunspell/en_CA
/usr/share/hunspell/en_DK
/usr/share/hunspell/en_GH
/usr/share/hunspell/en_HK
/usr/share/hunspell/en_IE
/usr/share/hunspell/en_IN
/usr/share/hunspell/en_JM
/usr/share/hunspell/en_MW
/usr/share/hunspell/en_NA
/usr/share/hunspell/en_NG
/usr/share/hunspell/en_NZ
/usr/share/hunspell/en_PH
/usr/share/hunspell/en_SG
/usr/share/hunspell/en_TT
/usr/share/hunspell/en_ZA
/usr/share/hunspell/en_ZM
/usr/share/hunspell/en_ZW
/usr/share/hunspell/en_US
/usr/share/hunspell/ru_RU
/usr/share/hunspell/ru_UA
LOADED DICTIONARY:
/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic
username@fedora:~$ sudo dnf install hunspell-ru
Last metadata expiration check: 0:00:54 ago on Fri 15 Dec 2023 17:03:33 +03.
Package hunspell-ru-1:0.99g5-26.fc39.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
username@fedora:~$

In my case LOADED DICTINARY part contains only en_US part, and I would like to have ru_RU also.

In that case I can setup multiple locales same time? Is it possible to do so per-user or per-system, instead of per-application?

1 Like

In GNOME, multi-language support is propagated through input language.

I would go to Settings > keyboard > input sources > click + > add an input source (other languages).

Thank you for the info! I will read the link. But I have allready two languages at input sources. Can’t figure out what have I messed up.

Click on three dots on the right end of the language bar, select ‘Preferences’ and go to toggle key for your choice.

Once language is loaded, the spell check and global preference apply to apps you are using. I checked it on GNOME text editor and LibreOffice writer.

For your coding/comments/documentation, you need a new set of prose linters, anyway to inspect documentation quality beyond spell-checking.

I am so sorry, but I cannot get what I’m doing wrong. What is language bar? I have two input languages in system allready.

I’m adding to your question here and explain how I would use multiple locale in my workflow. I’m mistaken if you already solved spell checking in Russian.

I have installed both language packs, but can have only English spellchecking working. I think I don’t understand some options or something. Also I have two input languages and can switch between them, but still, only English spellchecking is working for me.

Update. Sir @ledeni:fedora.im from matrix channel explained me, that we can have only one spellcheck language at the time, but not both. Now I got it, and think I can point this point as solution.

I understand your question now. I checked it in KDE and t can only have one spell check dictionary at a time.

It was just logic error from me, because I’m relatively new to linux desktop and using it alongside another OS. I appreciate your time very much, thank you!

1 Like