You are not logged in.

#1 2021-01-16 10:36:28

FlatEarthGary
Member
Registered: 2021-01-16
Posts: 36

[SOLVED] Locale error, won't let me have english

Hello there!

The problem that I'm experiencing is for example when I try to run perl programs I get this error:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LANG = "en_SE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I've uncommented "sv_SE.UTF-8 UTF-8  " in /etc/locale.gen and I've set /etc/locale.conf to "LANG="en_SE.UTF-8"". Since I'm on KDE/Plasma I have also deleted the ~/.config/plasma-localeerc file.

Nothing of this has worked and I still can't run programs that rely on locale successfully.

When I run "locale" in the terminal I get this response:

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_SE.UTF-8
LC_CTYPE="en_SE.UTF-8"
LC_NUMERIC="en_SE.UTF-8"
LC_TIME="en_SE.UTF-8"
LC_COLLATE="en_SE.UTF-8"
LC_MONETARY="en_SE.UTF-8"
LC_MESSAGES="en_SE.UTF-8"
LC_PAPER="en_SE.UTF-8"
LC_NAME="en_SE.UTF-8"
LC_ADDRESS="en_SE.UTF-8"
LC_TELEPHONE="en_SE.UTF-8"
LC_MEASUREMENT="en_SE.UTF-8"
LC_IDENTIFICATION="en_SE.UTF-8"
LC_ALL=


Any help is much appreciated, thank you and have a great day!

Last edited by FlatEarthGary (2021-01-16 15:11:14)

Offline

#2 2021-01-16 10:56:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: [SOLVED] Locale error, won't let me have english

en_SE is not a valid locale, why do you set it as your LANG= ?

set the sv_SE you've uncommented. If you want your general language to be english, uncomment one of the english locales (... you'll want en_US anyway, it's a required fallback for a few things) set LANG to the english locale and LC_NUMERIC and LC_TIME or so to sv_SE

Last edited by V1del (2021-01-16 11:04:36)

Offline

#3 2021-01-16 11:03:16

FlatEarthGary
Member
Registered: 2021-01-16
Posts: 36

Re: [SOLVED] Locale error, won't let me have english

V1del wrote:

en_SE is not a valid locale, why do you set it as your LANG= ?

Ohh, I didn't know that. I want to have everything display as English but I want my timezone as well as timeformat to be in Swedish (24h clock). Am I supposed to set it to sv_SE.UTF-8?

Offline

#4 2021-01-16 11:06:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: [SOLVED] Locale error, won't let me have english

Yes see my edit, set lang to an english locale and the other variables you see in the locale output to the swedish locale as appropriate. See: https://wiki.archlinux.org/index.php/Locale#Variables

Last edited by V1del (2021-01-16 11:07:09)

Offline

#5 2021-01-16 11:23:07

FlatEarthGary
Member
Registered: 2021-01-16
Posts: 36

Re: [SOLVED] Locale error, won't let me have english

V1del wrote:

Yes see my edit, set lang to an english locale and the other variables you see in the locale output to the swedish locale as appropriate. See: https://wiki.archlinux.org/index.php/Locale#Variables

I have changed my locale.conf to:

LANG="en_US.UTF-8"
LC_ADRESS="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE=C
LC_MEASUREMENT="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_CTYPE="sv_SE.UTF-8"

I've run "locale-gen" plenty of times but I still get this error:

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_SE.UTF-8
LC_CTYPE="en_SE.UTF-8"
LC_NUMERIC="en_SE.UTF-8"
LC_TIME="en_SE.UTF-8"
LC_COLLATE="en_SE.UTF-8"
LC_MONETARY="en_SE.UTF-8"
LC_MESSAGES="en_SE.UTF-8"
LC_PAPER="en_SE.UTF-8"
LC_NAME="en_SE.UTF-8"
LC_ADDRESS="en_SE.UTF-8"
LC_TELEPHONE="en_SE.UTF-8"
LC_MEASUREMENT="en_SE.UTF-8"
LC_IDENTIFICATION="en_SE.UTF-8"
LC_ALL=

When I try to run "locale". I've deleted ~/.config/plasma-localerc too but I still get the error.

Offline

#6 2021-01-16 11:24:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: [SOLVED] Locale error, won't let me have english

You need to log out and back in at the very least for these changes to take effect.

Maybe also just do the correct setup in plasma's GUI instead of trying to delete the file it creates, you should be able to set these values relevantly there as well, but if they aren't they shouldn't have this much of an inherent impact.

Last edited by V1del (2021-01-16 11:28:49)

Offline

#7 2021-01-16 11:55:56

FlatEarthGary
Member
Registered: 2021-01-16
Posts: 36

Re: [SOLVED] Locale error, won't let me have english

V1del wrote:

You need to log out and back in at the very least for these changes to take effect.

Maybe also just do the correct setup in plasma's GUI instead of trying to delete the file it creates, you should be able to set these values relevantly there as well, but if they aren't they shouldn't have this much of an inherent impact.

I can't figure this out...

I have changed my locale.conf to this:

LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"
LC_ADRESS="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE=C
LC_MEASUREMENT="sv_SE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_CTYPE="sv_SE.UTF-8"

And then run locale-gen and rebooted my computer.
But I still get this error:

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_US.UTF-8
LC_CTYPE=sv_SE.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME=sv_SE.UTF-8
LC_COLLATE=C
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=sv_SE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


This is my Plasma GUI settings:
https://i.imgur.com/Gm70ClX.png

Offline

#8 2021-01-16 12:08:59

loqs
Member
Registered: 2014-03-06
Posts: 19,025

Re: [SOLVED] Locale error, won't let me have english

What is the output of the following:

locale -a
grep -v ^# /etc/locale.gen
localectl

Please use code tags for commands and their outputs.

Offline

#9 2021-01-16 12:12:40

FlatEarthGary
Member
Registered: 2021-01-16
Posts: 36

Re: [SOLVED] Locale error, won't let me have english

loqs wrote:

What is the output of the following:

locale -a
grep -v ^# /etc/locale.gen
localectl

Please use code tags for commands and their outputs.

I figured it out! I had forgot to uncomment the en_US.UTF-8 in locale-gen haha.

But thank you so much for your reply! Have a great day!

Offline

#10 2021-01-16 12:24:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,351

Re: [SOLVED] Locale error, won't let me have english

Well yes, I did mention that you should do that.

Please mark as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB