Thursday, March 8, 2018

Stop trying to guess display language based on keyboard layout

A very common setup among non-English speaking computer power users is to have display language in English but have a country specific keyboard layout. For example I'm using the Finnish keyboard because I need to be able to easily type our special letters ö and ä. If your computer comes from someone else (such as your employer) there is not even the possibility to have a non-Finnish keyboard layout.

All of this has worked for tens of years flawlessly. However recently I have noticed that many programs on multiple platforms seem to alter their display language based on keyboard layout, which is just plain wrong. Display language should be chosen based on the display language choice and nothing else.

I first noticed this in the output of ls, which one would imagine to have reached stability ages ago.

Here we see that ls has chosen to print months in Finnish. Why? I have no idea. This was weird on its own, but then it spread to other operating systems as well. For no reason at all the existing Gimp install switched its display language to Finnish.

Let me reiterate: no setting was changed and the version of Gimp was exactly the same. One day it just decided to change its language to Finnish.

Then the issue spread to Windows.

VLC on Windows has chosen on my behalf to show its menus in Finnish in a completely English Windows 7 install. The only things it could use for language detection are geolocation and keyboard settings and both of these are terrible ideas. The OS has a language. It is very clearly specified. All other applications obey it, VLC should too.

The real kicker here is that Gimp on Windows displays English text correctly, as does VLC on macOS.

The newest case is the new Gnome-ified Ubuntu, whose lock screen stubbornly displays dates in the wrong language. It also does not conjugate the words correctly and has that weird american month/date date ordering which is wrong for Finnish.

What is causing this?

I don't know. But whoever is behind this: please stop doing that.


  1. I use a complete setup based on EN-US, locale and keyboard and layout. But some months ago I was pointed to the final solution "EurKEY":
    The Layout for Europeans, Coders and Translators

    You will use a EN-US layout, but practically every european letter is just a keypress away and it is a joy to use. Switching EN-US and DE-DE was easy with GNOME, but EurKEY is even better. It is already installed usually, but GNOME hiddes it.

    1.) Use dconf to switch
    org.gnome.desktop.input-sources show-all-sources ON
    2.) Settings -> Region and language -> English -> EurKEY

    Don't ask me why that layout is hidden, it literally a fix for a world were computing is always english but you have to communicate in your locale language.

  2. I remember hitting this exact problem many years back when using Gentoo. Gentoo and arch wiki still seems to be the best places for the answer: Use LC_ variables to finetune localisation settings.

    1. This of course wont fix Windows from being generally terrible when using mixed locales. ;)