View RSS Feed

karlmistelberger

Leap / Plasma Locales Configuration

Rate this Entry
Locales come with three flavors. Each has its own configuration file:

1. System Locale:

System locale is set during installation:
Code:
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:
Code:
 erlangen:~ # localectl set-locale en_GB.utf8
Code:
erlangen:~ # localectl set-keymap de-latin1-nodeadkeys
Code:
erlangen:~ # localectl set-x11-keymap de pc105 nodeadkeys terminate:ctrl_alt_bksp
2. User Locale:

Login shell reads ~/.profile:
Code:
karl@Leap-15-4:~> grep ^export .profile 
export LANG=fr_FR.UTF-8
karl@Leap-15-4:~> 
Code:
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:
Code:
karl@Leap-15-4:~> cat .config/plasma-localerc  
[Formats] 
LANG=de_DE.UTF-8 

[Translations] 
LANGUAGE=en_GB:de 
karl@Leap-15-4:~>
Code:
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.
Code:
cp /usr/share/i18n/locales/en_DK /usr/share/i18n/locales/nl_DK
Create the new locale:
Code:
localedef -f UTF-8 -i nl_DK nl_DK.UTF-8
Adjust system locale:
Code:
erlangen:~ # localectl set-locale LC_TIME=nl_DK.UTF-8 
erlangen:~ #
Code:
karl@erlangen:~> date
2022-10-20T13:09:19 CEST
karl@erlangen:~>

Submit "Leap / Plasma Locales Configuration" to Digg Submit "Leap / Plasma Locales Configuration" to del.icio.us Submit "Leap / Plasma Locales Configuration" to StumbleUpon Submit "Leap / Plasma Locales Configuration" to Google Submit "Leap / Plasma Locales Configuration" to Facebook Submit "Leap / Plasma Locales Configuration" to Twitter

Categories
KeepItSimple