Lack of properly defined locale causing problems

I’m in Tumbleweed and after my last update after booting it hangs at a certain point and will go no further… so I started in recovery mode, there I got to a point where it gave me instructions to flush journalctl and continue and got to my login screen and in.
I looked at journalctl and the only thing that showed up was this :

Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.

I also get a similar message if I use kdesu.
A more pressing problem is when I try to use snapper - I’m accessing this because I now boot from a snapshot pre-update (proves it works anyway!) which I want to protect from erasure : any attempt use it in the command line returns “unconfigured locale”

As it is, if I go into KDE settings all I find are “C” and “en_US” - what I want is en_GB. I looked at the locale man page and find that

/usr/share/i18n/locales
              Usual default path for locale definition files.

this folder is absent on this install. This could explain the lack of configured locale.

What am I to do? Any modifications are going to be lost because I can only get in using a pre-install snap and I can’t get into snapper…

Show

ls /usr/lib/locale

I know it’s in there - along with half a giga of ones I’ll never use. The problem is they are not available in the configuration of the system

Any attempt to use what? Show the full command line and the complete output.

Snapper - I haven’t time to try and mess about with it now, I’ll do it later.

journalctl gave the message without saying what was having the problem - just the error without any reference to a program - kdesu and snapper are two instances where I get it on the command line

Reading the message again, it would seem to be an underlying one with Qt (whatever that is) probably Qt6 as I’ve not experienced it before it upgraded

An example from snapper :

sudo snapper list
[sudo] password for root: 
Failed to set locale.

Show

sudo env | grep -E 'LC_|LANG'

immediately before running sudo snapper.

I found this https://www.cyberciti.biz/faq/how-to-set-locales-i18n-on-a-linux-unix/ which gives a series of command line instructions about locales. I would expect them to give consistent results.
If you key in “locale” you’re supposed to get “information about the current locale, or all locales on the screen.” I get this :

~> locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_DK.UTF-8
LC_CTYPE="en_DK.UTF-8"
LC_NUMERIC="en_DK.UTF-8"
LC_TIME="en_DK.UTF-8"
LC_COLLATE="en_DK.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES="en_DK.UTF-8"
LC_PAPER="en_DK.UTF-8"
LC_NAME="en_DK.UTF-8"
LC_ADDRESS="en_DK.UTF-8"
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=en_150.UTF-8
LC_IDENTIFICATION="en_DK.UTF-8"
LC_ALL=

This is completely surreal - nowhere have I even seen en_DK as an option… although going deeper into kde settings I find the “Address” is configured to the Danish standard.
“~> cat etc/locale/conf” is supposed to give me “current locale for all users” - I get :

~> cat etc/locale/conf
cat: etc/locale/conf: No such file or directory

lastly, there is a systemd command “localectl status” and this gives me :

~> localectl status
System Locale: LANG=en_GB.UTF-8
    VC Keymap: fr
   X11 Layout: fr
    X11 Model: pc105
  X11 Options: terminate:ctrl_alt_bksp

Which is what I configured during the original install.
There is a clear mismatch here.
Systemd is saying one thing and Yast and KDE system settings are saying another.

It seems that the folder “/usr/share/i18n/locales” should have been created during the install and wasn’t, as well, possibly, as other files which should have been populated with the information necessary for the system to be coherent.

The question now is what do I do about it?

Did you ever try in KDE to get a proper ISO formatting of the date? That is where possibly en_DK can come from.

BTW, when you want people to help you further, you better provide the information they ask for (@arvidjaar asked you several things, I did not see the answers). Else they will probably stop acting on this thread.

I think I have replied to all his questions - but possibly (probably) I’ve not been clear. Please indicate where that is the case.

I have tried altering things in settings and nothing happens - I click on what I want and when I check back it hasn’t changed.
I’m not sure how it works. All the possible locales are stored in usr/share/locale or seem to be (and are present), are they copied to /usr/share/i18n/locales (which is missing) and activated?

Would it suffice to create the missing folders and files - or do a reinstall of some component?

It’s all some way above my pay grade !

This locale does not exist by default. Just change your KDE locale configuration to only use en_GB everywhere.

I tried

sudo env | grep -E 'LC_|LANG' 

Before invoking snapper, but I got the same error message.

~> sudo env | grep -E 'LC_|LANG'
[sudo] password for root: 
LANGUAGE=en_US
LC_MONETARY=fr_FR.UTF-8
LANG=en_DK.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=en_150.UTF-8
webby@Rincewind:~> sudo snapper list
Failed to set locale.
# | Type   | Pre # | Date | User | Cleanup | Description | Userdata
--+--------+-------+------+------+---------+-------------+---------
0 | single |       |      | root |         | current     |

Snapper sort of works but only lists the snap I’m in - if I do “zypper dup” from within this snap will it snap the snap?
Journalctl was most unhelpful.

I have tried, but it won’t do it.
Haven’t tried on the command line, because I don’t know how, but from using the command “locale” (see above), this was in the result

locale: Cannot set LC_ALL to default locale: No such file or directory

Remove ~/.config/plasma-localerc.

OK

Done that

So I can modify things like addresses, telephone numbers, dates etc. but I cannot change the overall language setting. I have, still, the only options of “C” and “American English” if I click on “Add language”. The list is empty - even though they are in user/share/locales

We’re going in circles
see above

Systemd knows but KDE, yast and any application using them as a reference don’t wherein the confusion.
Also there is the question of the missing file or folder referred to when I pass the 'locale" command.

I have no idea what yast or any application “don’t know”. Explain what you did, what you saw and what made you to conclude that “it did not know”.

You changed locale configuration in KDE which overrides systemwide settings for any program started from within this KDE session. Moreover, your settings caused KDE to export invalid locale (just search Internet for en_DK) that makes all programs fail to set it (some fail silently, some complain).

Removing locale configuration file should make KDE default to whatever is set systemwide.

It isn’t installed - but trying to install it gave

 error: can't create transaction lock on /usr/lib/sysimage/rpm/.rpm.lock (Read-only file system)

Which answers my question as to whether I can do zypper dup from within a snap, it won’t allow me to.

Looking at what the package supplies it consists mainly of a long list of language files and I would hazard a guess that the installation will create the missing folders and files.

Again - you do not describe what you did before this, so any answer will be just a wild guess.

You apparently misunderstand. You do not need to select your locale in KDE system settings. It will be inherited from systemwide settings displayed by localectl as long, as you do not attempt to modify it in KDE.