Issues with `locale` settings

Hello everyone,
ever since I’ve installed EndeavourOS (coming from Manjaro), I’ve been getting warnings that my locale settings are messed up/couldn’t be read by several programs (for example, GTK programs print out Unsupported locale setting. Fix your locales
Unable to load locale dir, translations won't work. when launching).
Running locale outputs the following: https://gist.github.com/CommandMC/442d14999640aba009d90e22cefc7680
I thought about adding the three missing variables into /etc/locale.conf, but wanted to ask you guys first since I don’t want to potentially break my system.

In case it helps: I’d like to have my system language set to English while date/time formats should be set to German.

Have you run locale-gen recently?

1 Like

Sorry for not mentioning, yes I have. It generates for both en_US and de_DE but the issue still persists.

I’ll send the exact output tomorrow, am on phone right now.

1 Like
LANG=en_DE.UTF-8

LC_CTYPE="en_DE.UTF-8"

LC_COLLATE="en_DE.UTF-8"

gibt’s das? en_DE?
2020-08-10_08-282020-08-10_08-46

1 Like

(“That exists? en_DE?”)
Appearently, yes. I didn’t write it in there myself though, the installer / locale-gen did. But as far as I got it, that shouldn’t be an issue, just tells applications that I want English language but am in Germany.
Some more outputs:

Listing enabled locales:

$ cat /etc/locale.gen | grep -v '^#'
en_US.UTF-8 UTF-8
de_DE.UTF-8 UTF-8

Full output of locale-gen

$ sudo locale-gen
Generating locales...
  en_US.UTF-8... done
  de_DE.UTF-8... done
Generation complete.
1 Like

Not sure if this will be the solution for you, but I also had some issues with my locale(s) coming from Manjaro.

Apart enabling the locale, making sure I selected a “UTF-8” one(s) and generating it with sudo locale-gen, I also had to install the hunspell packages for the needed languages, as the Hyphenation packages (hyphen-en, hyphen-fr, etc…) for the selected locales to stop the Warning/Messages I also got in LibreOffice about a wrong language configuration and missing files.

Also, after having generate the locale, don’t forget to reboot or to run:

unset LANG
source /etc/profile.d/locale.sh
1 Like

That kinda solved the issue! When I run

unset LANG
source /etc/profile.d/locale.sh

, my locale gets “corrected” to

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

, but get’s set back to the broken one on login/reboot.

So to fully fix this I just write the correct locale into /etc/locale.conf?

EDIT: Shouldn’t LC_CTYPE be de_DE though? Since as far as I understood the rather cryptic descriptions that the arch wiki links to (https://jlk.fjfi.cvut.cz/arch/manpages/man/locale.7), it handles written characters?

1 Like

When I run localectl status I can see that my locale is

System Locale: LANG=en_GB.UTF-8
LC_NUMERIC=en_IL
LC_TIME=en_IL
LC_MONETARY=en_IL
LC_PAPER=en_IL
LC_ADDRESS=en_IL
LC_TELEPHONE=en_IL
LC_MEASUREMENT=en_IL
Blockquote
I can’t say about CTYPE … seems I don’t have it :upside_down_face:

About the reboot issue, the steps should be :

  1. Uncomment the needed locales in /etc/locale/gen
  2. SAVE the file
  3. Run sudo locale-gen
  4. Reboot or run the unset LANG and source commands.

Normally you should retain your locale at reboot.

1 Like

Well, when I run locale I do have the CTYPE entry…

LANG=en_GB.UTF-8
LC_CTYPE=“en_GB.UTF-8”
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_IL.UTF-8
LC_COLLATE=en_GB.UTF-8
LC_MONETARY=en_IL.UTF-8
LC_MESSAGES=“en_GB.UTF-8”
LC_PAPER=en_IL
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_IL
LC_TELEPHONE=en_IL
LC_MEASUREMENT=en_IL.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_ALL=

I think that if you edit your /etc/locale.conf manually it cannot hurt anyway (I also did this in fact, in my system in an early stage)

2 Likes

Yup, modifying the file solved that issue

The only slight issue I have now is when I start lutris, it outputs Unable to load locale dir, translations won't work. Not sure if that’s related to this though

2 Likes

i do just install with language to english us and keyboard to german, calamares produces a working solution:

LANG=en_US.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
2 Likes