Locales come with three flavors. Each has its own configuration file:
** 1. System Locale:**
System locale is set during installation:
**erlangen:~ #** **cat /etc/locale.conf**
LANG=en_GB.utf8
**erlangen:~ #** **localectl**
System Locale: LANG=en_GB.utf8
VC Keymap: de-nodeadkeys
X11 Layout: de
X11 Model: pc104
X11 Variant: nodeadkeys
X11 Options: terminate:ctrl_alt_bksp
**erlangen:~ #**
Change locale related settings:
**erlangen:~ #** **localectl set-locale en_GB.utf8**
[FONT=monospace]****erlangen:~ #** localectl set-keymap de-latin1-nodeadkeys**[/FONT]
[FONT=monospace][FONT=monospace]****erlangen:~ #** localectl set-x11-keymap de pc105 nodeadkeys terminate:ctrl_alt_bksp**[/FONT][/FONT]
2. User Locale:
Login shell reads ~/.profile:
karl@Leap-15-4:~> **grep ^export .profile**
export LANG=fr_FR.UTF-8
karl@Leap-15-4:~>
karl@Leap-15-4:~> **zypper -n update -D**
Les privilèges root sont requis pour lancer cette commande.
karl@Leap-15-4:~>
** 3. Plasma Locale:**
Konsole inherits locale from plasma:
karl@Leap-15-4:~> **cat .config/plasma-localerc**
[Formats]
LANG=de_DE.UTF-8
[Translations]
LANGUAGE=en_GB:de
karl@Leap-15-4:~>
karl@Leap-15-4:~> **zypper -n update -D**
Root-Rechte werden benötigt um dieses Kommando auszuführen.
karl@Leap-15-4:~>
** 4. Creating your own locale:**
Install glibc i18n sources: zypper install glibc-i18ndata
Copy existing source. en_DK has date formats following ISO 8601-1988 and English language. nl_DK will have Dutch language.
**cp /usr/share/i18n/locales/en_DK /usr/share/i18n/locales/nl_DK**
Create the new locale:
**localedef -f UTF-8 -i nl_DK nl_DK.UTF-8**
Adjust system locale:
erlangen:~ # **localectl set-locale LC_TIME=nl_DK.UTF-8 **
erlangen:~ #
karl@erlangen:~> **date**
2022-10-20T13:09:19 CEST
karl@erlangen:~>