Writer: Change spellchecker language with keyboard layout on Linux Mint

An older question addressed this issue in 2012: Shortcut for changing language?
The solution was basically “it’s a feature exclusive to Windows”, so “use a macro workaround”. Is there a simpler solution now?

For context, I use IBus to switch keyboard layouts on Linux Mint 21.1 Xfce. (Linux doesn’t support more than 4 keyboard layouts out of the box due to a kernel limitation, so I have to use a workaround like IBus for multilingual support.) On Windows 10, changing the keyboard layout automatically changes the spellchecker language in Writer to match the keyboard layout. (It’s not perfect because there’s a delay in the displayed language on the UI.) I can’t replicate this behavior on Linux. When I change keyboard layouts, the spellchecker stays on its default language.

Thanks for reading. I look forward to your suggestions or solutions!

I frequently write multilingual documents but I have a single keyboard connected to my computer. It is a “standard” mechanical keyboard (not a fancy touchscreen one where key engravings can be electronically modified). I am not a professional typist and therefore need visual clues about where less frequent keys are located. This means I won’t change the layout when I switch to another language.

The language used for text is a very important semantic element and, as such, must be transferred to the metadata marking the text. This is done through styles.

  • For “mono-lingual” documents, you simply change the Language attribute in Default Paragraph Style (or other equivalent attributes in Tools>Options – at least two ways to do it) and you continue typing as usual.
  • For multi-lingual documents, it is a bit more complicated, but not that much, because you need several sets of styles, one per language, paragraph and character styles altogether.

You can associate your main Text Body xxx with a keyboard shortcut so that switching to another language for the main parts of text is as easy as switching a keyboard layout.


Don’t confuse semantic indication of a new language sequence with usage of a physically different keyboard. You can type any text with any keyboard. The only comfort issue is entering language-dedicated characters. From experience, they are present in nearly all European layouts (for Western languages). And if one of them is too complicated to type or missing, it is very easy under Linux to design a customised keyboard layout, starting from the one for your locale and keyboard model, to add it or even relocate Alt Gr and other modifier-triggered characters in a more mnemotechnic way (for example, most of these secondary or tertiary characters are laid out for their similarity with QWERTY primary character; what about QWERTZ or AZERTY keyboards?).

1 Like

tdf#108151, note that system input language detection is already implemented on Qt5 vcl plugin. Still, Linux makes it surprisingly, unbelievably hard-to-impossible for applications to obtain this information.

1 Like

I marked the other response as the solution, but this is the exact info I was looking for. Apologies for not researching it more thoroughly. I should have used another search engine as mine didn’t show any results from bugzilla, but another engine did. Thanks for your response here and covering this issue, Mike!

Here is how ~100% standard keyboards sold in my country look like:

Note how the two layouts (used predominantly here) are already engraved there on the keys, because ~100% of users indeed need the visual clues :slight_smile:

So - believe me, there are already solutions for this problem, much older than the fancy touchscreen ones :smiley:, and large portion of world population uses it every day for very long time. Indeed, it is much less known in Roman-languages-speaking countries, hence the curious situation, when one part of users can’t live without the feature, while the other doesn’t even know about it, or considers it useless :smiley:

And note: you may even have the same keyboard layout, associated with different input languages, configured in system. Then, you may switch the input languages using the system keyboard shortcut, and have the same layout - thus, not have to change your typing procedure, but have 100% reliable way to set the text language on the systems that support this.

@mikekaganski Nice, I had forgotten the multi-script context where layout switch makes full sense (Japan, Korea, of course Cyril. I was prisoner of my single-script (or single-alphabet) routine where the layout switch brings more confusion than help.

Is your keyboard damaged :wink: ? I seem to read the same Cyrillic character on G and K (as Cyrillic P). Where is Cyrillic L? Is it an artefact of low resolution image?

:smiley: No, that is not my keyboard, just some image from the Internet; here is mine:

It is dark, dirty, and my photo skills are awful … :slight_smile:

The character on G is the Cyrillic П, and on K is Л. They look a bit similar, but the first sounds like Latin “P”, and the second is like Latin “L”. So - this is the answer to the second question, too :slight_smile: