Can't get rid of locale

Hi,
my manjaro is configured to use de_DE for formats and en_US as display language. After each of the last three upgrades, I had to

sudo locale-gen en_US en_US.UTF-8 de_DE de_DE.UTF-8
sudo localedef -i de_DE -f UTF-8 en_DE.UTF-8

because otherwise libreoffice would not open filenames with Umlauts.
But this broke Blenders handling of Umlauts: I can’t type Umlauts and while I can save an existing file with Umlauts, I can’t create a new file with Umlauts in the filename in Blender.

Even after removing german formats in the kde settings,

sudo locale-gen en_US en_US.UTF-8
sudo localedef -i en_US -f UTF-8 en_US.UTF-8
sudo localectl set-locale LANG=en_US.UTF-8

and numerous reboots I still get en_DE.

$ locale

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_DE.UTF-8
LC_CTYPE=“en_DE.UTF-8”
LC_NUMERIC=“en_DE.UTF-8”
LC_TIME=“en_DE.UTF-8”
LC_COLLATE=“en_DE.UTF-8”
LC_MONETARY=“en_DE.UTF-8”
LC_MESSAGES=“en_DE.UTF-8”
LC_PAPER=“en_DE.UTF-8”
LC_NAME=“en_DE.UTF-8”
LC_ADDRESS=“en_DE.UTF-8”
LC_TELEPHONE=“en_DE.UTF-8”
LC_MEASUREMENT=“en_DE.UTF-8”
LC_IDENTIFICATION=“en_DE.UTF-8”
LC_ALL=

I just want en_US, how to get rid of en_DE for good?

I know I had to deal with a .pacnew locale file (I don’t remember the exact filename) after the last big update. Have you run pacdiff to see if you have any .pacnew files?

Hi! I do know that if “LC_ALL=” is set to a particular locale, then it overrides all the other settings, at least according to IBM documentation. I don’t know how to edit this but from looking at what you’ve done so far I would guess "sudo localectl set-locale LC_ALL=“en_US,UTF-8” or something along those lines may just work. If not it may point you in the right direction at least! :crossed_fingers:

There is a file: /etc/default/locale

On my system it shows most of my locale settings which are in en_GB format. There is no LC_ALL line there, but mine isn’t set anyway. If you were to add an LC_ALL=“en_US.UTF-8” to it, or one without the " marks, that might just do it!

You’ll need to go root to edit this as it’s a system file, but you can do that with Kate (install it if it’s not there). Then I guess a reboot should show the results of locale in a terminal :slightly_smiling_face:

KDE is utilitzing ~/.config/plasma-localerc - check/adjust as you see fit.

2 Likes

That will work for the user in each session but it won’t be system-wide. Fine for running applications though.

There is a locale.gen.pacnew but it does not contain en_DE.

en_DE.UTF8 is no valid locale.

On another computer I don’t have an LC_ALL entry in /etc/default/locale but everything just worksTM.
But on this one, I added LC_ALL=en_US.UTF-8 but I still get en_DE.

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_DE.UTF-8
LC_CTYPE=“en_DE.UTF-8”
LC_NUMERIC=“en_DE.UTF-8”
LC_TIME=“en_DE.UTF-8”
LC_COLLATE=“en_DE.UTF-8”
LC_MONETARY=“en_DE.UTF-8”
LC_MESSAGES=“en_DE.UTF-8”
LC_PAPER=“en_DE.UTF-8”
LC_NAME=“en_DE.UTF-8”
LC_ADDRESS=“en_DE.UTF-8”
LC_TELEPHONE=“en_DE.UTF-8”
LC_MEASUREMENT=“en_DE.UTF-8”
LC_IDENTIFICATION=“en_DE.UTF-8”
LC_ALL=

Well no, it wouldn’t because that’s something you would set, while a .pacnew is a new default settings file. Take a look at the existing locale.gen file and see if it mentions en_DE. If it does, but you want to get rid of the DE option, then you could try telling pacdiff to overwrite the existing locale.gen with the .pacnew version and see if that helps. Be sure to back up the old one, of course.

I have read that it is what you get if you configure US for language and german for formats and this is the combination I want, but without the problems just like on my other machine - I think that I configured both the same way.
But on the working machine, locale output is LANG=en_US.UTF-8, with NUMERIC and TIME =de_DE.UTF-8

No en_DE in locale.gen either.

That seems to be the only file containing en_DE:

cat ~/.config/plasma-localerc
[Formats]
LANG=en_DE.UTF-8

on the machine without issues, it contains en_US, so I assume that the global settings are correct and just the local ones got messed up.

Setting ~/.config/plasma-localerc to en_US
AND one reboot later, everything’s working again! Now I just need to get my formats back and everything will be fine.

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

Thank you all for the help!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.