Amber → Byzantium Upgrade / locales

After upgrading to Byzantinum I found that gnome-calendar, gnome-calculator and gnome-todo ignored my regional settings in gnome-control-center.

The solution to my problem I found here: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/526

This issue pointed into the right direction: my environment variables had been wrong.

My variables looked like this:

$ set | grep 'LANG\|^LC_'
GDM_LANG=de_DE.UTF-8
LANG=de_DE.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_TIME=en_US.UTF-8

Since gnome-[calendar|todo|calculator] seems to set the language according to these variables this explained why they showed me an interface with unexpected regional settings (in gnome-control-center I set my region to Germany).

I found two files in /etc containing settings for these variables:

/etc/default/locale (I deleted it, because it didn’t belong to any package)

and

/etc/locale.conf (contained the settings like shown above)

The latter belongs on my system to sytemd and has a man page man locale.conf. I changed the settings, set them in a shell without rebooting and tried calling gnome-calendar and it showed me the german regional settings.

$ . /etc/locale.conf
$ set | grep 'LANG\|^LC_'
GDM_LANG=de_DE.UTF-8
LANG=de_DE.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
$ gnome-calendar

After my next reboot I’ll see whether this solved the issue system wide.

Still there are questions open I didn’t look into, yet:

  • Which configuration dialog or configure script is supposed to setup /etc/locale.conf?
  • Where das gnome-control-center store it’s settings and how do they relate to /etc/locale.conf?
  • Is /etc/default/locale really not used (anymore)?
  • Where is the correct place to open an issue about this?

Help in research is welcome :wink: !

4 Likes

I had a very similar problem (even before upgrading, I had such mixed locales)
A simple dpkg-reconfigure locales fixed it.

Doesn’t work, tried that, too:

root@PureOS:/etc# ls -l locale.conf default/locale 
-rw-r--r-- 1 root root  52 Sep 10 09:06 default/locale
-rw-r--r-- 1 root root 230 Sep 10 09:10 locale.conf
root@PureOS:/etc# cat default/locale 
#  File generated by update-locale
LANG=de_DE.UTF-8
root@PureOS:/etc# cat locale.conf 
LANG=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_MONETARY=de_DE.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
root@PureOS:/etc# dpkg-reconfigure locales
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.
root@PureOS:/etc# ls -l locale.conf default/locale 
-rw-r--r-- 1 root root  48 Sep 12 10:27 default/locale
-rw-r--r-- 1 root root 230 Sep 10 09:10 locale.conf
root@PureOS:/etc# cat locale.conf 
LANG=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_MONETARY=de_DE.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
root@PureOS:/etc# cat default/locale 
#  File generated by update-locale
LANG=C.UTF-8

In the reconfigure dialog I set the language to C.UTF.8 and it only changed the file in /etc/default/

edit: shortened the command line stuff above to what is necessary to demonstrate that dpkg-reconfigure locales didn’t do the job

update: I’m using PureOS Byzantium actually

sudo nano /etc/locale.conf
sudo nano /etc/default/locale
and fix values up to your preferences.
also make sure you have uncommented selected locale in /etc/locale.gen
and invoke sudo locale-gen
then reboot, and all should be fine
this is linux - you don’t have to use magic menus to reconfigure anything, you can simply edit text files manually :wink:

Hy i have a little problem too. In some programs the lang is mixed between en / de and Firefox and Thunderbird are only en.
LANG=de_DE.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
whats going wrong? I am more newby than prof
w.n.

For firefox an thunderbird you need to install the packages firefox-esr-l10n-de and thunderbird-l10n-de to get them in german.

1 Like

thx Chri
what means “esr” ? and i just see chromium is en too

ESR stands for extended support release

For chromium it should be the package chromium-l10n.

(I’m not using chromium since I have ungoogled-chromium :wink: )

Hy all. i have problems with changin to KDE, in dolphin i have no simbols for created folders/pdf etc. Just the symbols from the original installation are shown.
Also, but not a pureos problem… when i cut off the current the Bios dos not start with the HDD. I have to enter in bios and chosing the hdd to start
Some ideas? thx