Until quite recently I didn’t know this locale existed, but I use the ‘en_NL’ locale in KDE Plasma. It’s exactly what I needed and it’s amazing.
However, I can only use it in Plasma, and after I’ve logged in. I can’t figure out how to set it up system wide so that SDDM and all the other systems can use it.
locale -a does not list the locale. It does list a few *_NL, nl_*, and en_* locales, but those either translate things into Dutch or change things using weird formats (such as dates and time).
find / -type f -name "*en_US*". Searching for files that define locales also didn’t do much for me. Trying to find something that defined en_US.UTF-8, for example, resulted in nothing I could use.
I think the main problem is is that it isn’t an officially supported locale, see: 14085 – en_NL: new locale (English language for the Netherlands). But, the locale I use exists and it exists somewhere on my system. Does anyone of you know how I use this locale system wide?
Edit: I forgot to mention I use Fedora 35 KDE spin.
If you are in a Debian based distro you can simply set the default locale by running [sudo] dpkg-reconfigure locales and selecting the ones you want. Then select the default for the system.
Caveat: If possible, set it to a -UTF8 locale as default, or you might get unreadable characters depending on the text.
Edit:
You will need to restart all services and/or reboot for it to take effect.
(1) I don’t use a Debian based distro, and (2) the locale I want to use is only available in Plasma’s regional settings and nowhere else–as far as I can tell. I pretty much use a locale that does not exist.
TL;DR: I’m trying to figure out how to export the locale only Plasma knows about and use it system wide. No luck so far.
In the meanwhile I have found that Plasma saves locale info in ~/.config/plasma-localerc:
Which means I can’t select it through something like localectl. I assume dpkg-reconfigure locales and localctl do something similar.
I have downloaded some locale definition files (I think, I’m actually not all too sure on how to use them) from here and tried to compile them with localedef, but localedef complains about not being able to find charmap files, which isn’t too crazy because /usr/share/i18n/charmaps is empty.
$ localedef -f UTF-8 -i en_NL en_NL.UTF-8
[error] character map file `UTF-8' not found: No such file or directory
[error] default character map file `ANSI_X3.4-1968' not found: No such file or directory
The reason you can’t install it because it was never generated properly. You set the locales for the system in /etc/locale.gen just uncomment the ones you need and re-run locale-gen
Edit:
To have a custom locale put it in /usr/local/share/i18n/SUPPORTED and copy the locale to /usr/local/share/i18n/locales/ then re-reun locale-gen
Edit2:
Ok so you can find the locale files here drop them where I said , regenerate the locales and you will have it available system wide.
Keyboard settings aren’t an issue. I don’t think I’ve ever seen a non-US keyboard since the 90s. It’s mainly SDDM displaying the date/time in the wrong format and me thinking “ugh, that needs to be fixed,” every single time I log in.
You’re definitely onto something. However, on Fedora locale-gen isn’t available; Fedora systems use localedef instead.
I’m also starting to think that maybe this whole topic should be about why language, region, and format settings are so rigidly connected. In my quest to fix SDDM I have found several people trying to use non-standard locales, like en_DE, or en_FI. I’m certainly not the only one who’s struggling to get a system that displays info in a language and/or formats that aren’t 100% in line with what local people in the area traditionally use (in everyday life)–and that includes Americans in the US who prefer to use a 24-hour clock, for example.
It took a bit too much time figuring stuff out to not share this so future me can find this later here, or it might help someone else. Especially finding out how to get the character maps took way too long. Most search results told me how to download Fedora Linux, how localedef works, or what the default location for the character maps is, but how to get them was near impossible to find.