I am trying to set the system language to English and wondering why it’s not working.
I read the following articles, but still cannot figure out, what the reason is:
Since I’m new in Manjaro, I’m not feeling comfortable yet using Terminal.
I assume the setting “LANG = de_DE.utf8” might be the clue. I’m using a German keyboard and would still like to use it, just the system language shall be switched to English.
I am glad about every further hint
Hi @Jucala ,
This helped me set everything correctly:
Difficulty: ★☆☆☆☆
Locale Errors
Locale errors are not always obvious and some applications simply stop working without any hints at all - e.g. Gnome Terminal is very sensitive to incorrect configuration of locale.
TL:DR
As root edit the file /etc/locale.gen
Enable the needed locales - including en_US.UTF-8 UTF-8 as fallback.
Rebuild the locale database using the locale-gen script
The Calamares installer adds the locales chosen to the end of /etc/locale.gen so check the bottom of the file …
So I’m guessing it will help you as well.
1 Like
You are correct - however - you need to enable it on your locale.gen file too. After you have enabled it you need to generate the messages.
The Manjaro Settings Manager has never failed in that regard.
System messages and keyboard layout is complete decoupled.
I use a Danish keyboard and English message system - no problemo.
I suspect there is another locale file in play here - using KDE Plasma? If so check the file ~/.config/plasma-localerc
Yes as this is a system file it is protected.
Use method 1 OR method 2 - not both
sudo nano /etc/locale.gen
First idenity which locales has been enabled in /etc/locale.gen - the last 10 lines will do
tail /etc/locale.gen
If the en_UK locale is not included then edit the locale.gen file and add it
sudo nano /etc/locale.gen
Scroll to the bottom of the file and append
en_UK.UTF-8 UTF-8
Save the file and run locale-gen script
Then edit your locale.conf file and replace
LANG=de_DE.utf-8
with
LANG=en_UK.utf-8
If it exist - remove the line reading
LC_MESSAGES=de_DE.utf-h
Save the file and reboot
https://man.archlinux.org/man/locale.conf.5
locale(7) — Arch manual pages
The individual compiled locale data files are searched for under subdirectories which depend on the currently used locale. For example, when en_GB.UTF-8 is used for a category, the following subdirectories are searched for, in this order: en_GB.UTF-8 , en_GB.utf8 , en_GB , en.UTF-8 , en.utf8 , and en .
Hi @Mirdarthos ,
Thank you for your hints! I’ll give a detailed description of my procedure in case any Linux newbie is still reading this.
To edit:
$ sudo nano /etc/locale.gen
I leave as it is:
en_GB.UTF-8 UTF-8
I changed:
#en_US.UTF-8 UTF-8
to
en_US.UTF-8 UTF-8
at the end I changed:
# Locales enabled by Calamares
#de_DE.UTF-8 UTF-8
#en_US.UTF-8 UTF-8
to
# Locales enabled by Calamares
#de_DE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
then I click Strg + O to save
„514 Lines written“
Rebuild locales
$ sudo locale-gen
output:
Generating locales...
en_GB.UTF-8... done
en_US.UTF-8... done
en_US.UTF-8... done
Generation complete.
Recheck your locales
$ locale -a
Output: I get a long list, including en_GB.utf8 and en_US.utf8
Verify if it works
$ ~ rofi -r
(Shall I put this in Terminal?)
Output: bash: /home/user: Ist ein Verzeichnis
$ rofi -show
Output: bash: rofi: Command not found
$ ~ rofi -show
bash: /home/user: Ist ein Verzeichnis
I restart the computer, but still, everything’s in German. I check the system language and receive:
$ localectl
output:
System Locale: LANG=en_GB.UTF-8
VC Keymap: de
X11 Layout: de
Strit
4 January 2023 08:36
7
This verifies that what you changed, works. It’s using the english language on display. At least it’s set as it. And the german keyboard layout. Chaning stuff in /etc/locale.gen does not change your keyboard layout.
Click on the English language section in your second screenshot. You can customize some options in there to match what you want. Then save it. And reboot.
Jucala:
#de_DE.UTF-8 UTF-8
For your locale specifics like date, phone etc to be displayed using de_DE - you must enable the same locale in locale.gen - rerun locale-gen script
Note that en_US is generated twice - this is caused by enabling it twice in locale.gen
As it is now - you disabled it - and therefore your date will be displayed in UK format - which I don’t think was your intention.
The locale is configured in different files - for changes to be picked up reboot or use localectl to set
Keymap in TTY
/etc/vconsole.conf
Available locale
This is defined by - always run locale-gen script after changes
/etc/locale.gen
Locale used is defined in
/etc/locale.conf
Keymap in Xorg
/etc/X11/xorg.conf.d/00-keyboard.conf
Manjaro settings manager: I set all available options in the Manjaro settings manager: to en_GB.utf-8.
Regarding your last line:
When I type:
~/.config/plasma-localerc
I receive:
File or directory not found.
Jucala
6 January 2023 13:17
10
@ linux-aarhus
Thanks for your tips and advice!
Date settings:
First of all, I’m happy if I manage to set the system settings to English. If I don’t change too many other settings unintentionally in the process, that would be great, of course. The time format actually plays a minor role, but I like to adjust it.
Keymap in TTY
When I type
/etc/vconsole.conf
I have no authorisation.
I have tried on good luck:
sudo /etc/vconsole.conf
Output:
Command not found
Keymap in Xorg
/etc/X11/xorg.conf.d/00-keyboard.conf
Output: INo authorisation.
sudo /etc/X11/xorg.conf.d/00-keyboard.conf
Output: Command not found.
Those are files you have or may have to edit/adjust with your preferred text editor