Edit locale

Message
Author
User avatar
BengtL
Posts: 3
Joined: Tue Jun 20, 2023 9:45 am

Edit locale

#1 Post by BengtL »

Some distros offer the users to set the system language separately from the rest of the locale, mx linux doesn't. As I can only accept english as system language but obviously want all other settings to be swedish, I need to edit the swedish locale and I want it system wide and not only per user account.

How to do it?

User avatar
CharlesV
Global Moderator
Posts: 7541
Joined: Sun Jul 07, 2019 5:11 pm

Re: Edit locale

#2 Post by CharlesV »

Welcome in!

Using the MX Package Installer, you can search for Swedish and then just install the Swedish Language Meta-Package and I believe will give you everything in Swedish.

I believe then you would run System Locales again from the MX Menu, and select your default language and that would do it. But, I think if you install that Swedish Pack it will set it up also. (Not positive about that.)
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Edit locale

#3 Post by fehlix »

BengtL wrote: Tue Jun 20, 2023 9:59 am Some distros offer the users to set the system language separately from the rest of the locale, mx linux doesn't. As I can only accept english as system language but obviously want all other settings to be swedish, I need to edit the swedish locale and I want it system wide and not only per user account.

How to do it?
System wide locale will be set within the simple text file:
/etc/default/locale
where you may find just one line something like

LANG=en_US.UTF-8

with LANG being defined alle the other LC_-locale parameters
are implicitly set to the value of LANG like this:

Code: Select all

LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
So you could set here the other LC_parameter to something like:

Code: Select all

LANG=en_US.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"

User avatar
BengtL
Posts: 3
Joined: Tue Jun 20, 2023 9:45 am

Re: Edit locale

#4 Post by BengtL »

Landed on my feet as it's now english language with the rest as swedish settings. But the locale is now all C instead of en and sv. Don't understand it and I tried to change it but it's stuck with C.
It works and I will keep it like this from now on.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Edit locale

#5 Post by fehlix »

BengtL wrote: Wed Jun 21, 2023 4:32 pm Landed on my feet as it's now english language with the rest as swedish settings. But the locale is now all C instead of en and sv. Don't understand it and I tried to change it but it's stuck with C.
It works and I will keep it like this from now on.
You may consider to tell us what and how you have changed.
Also note, at the top of the forum page the "Quick System Info" was mentioned to share for a good reason.

User avatar
BengtL
Posts: 3
Joined: Tue Jun 20, 2023 9:45 am

Re: Edit locale

#6 Post by BengtL »

I did try to edit /etc/default/locale to make it look like I wanted, which created error messages when I restarted. Deleted the file and made a new one with update-locale. Tried to change it to swedish from c several times to be able to change only the language to english, but as it somehow already worked as I wished I stopped there.

Code: Select all

System:
  Kernel: 6.1.0-9-amd64 [6.1.27-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-9-amd64 root=UUID=<filter> ro quiet splash
    resume=UUID=<filter> resume_offset=4759552
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23_beta2_x64 Libretto June 15  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Hewlett-Packard product: HP EliteBook Folio 9470m v: A1029D1102
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Hewlett-Packard model: 18DF v: KBC Version 62.19 serial: <superuser required>
    BIOS: Hewlett-Packard v: 68IBD Ver. F.62 date: 10/22/2015
Battery:
  ID-1: BAT0 charge: 30.0 Wh (58.5%) condition: 51.3/51.3 Wh (100.0%) volts: 14.6 min: 14.8
    model: Hewlett-Packard Primary type: Li-ion serial: <filter> status: discharging
CPU:
  Info: model: Intel Core i5-3437U bits: 64 type: MT MCP arch: Ivy Bridge gen: core 3 level: v2
    built: 2012-15 process: Intel 22nm family: 6 model-id: 0x3A (58) stepping: 9 microcode: 0x21
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache: L1: 128 KiB
    desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2294 high: 2556 min/max: 800/2900 scaling: driver: intel_cpufreq
    governor: ondemand cores: 1: 1858 2: 2556 3: 2439 4: 2325 bogomips: 19155
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915 v: kernel
    arch: Gen-7 process: Intel 22nm built: 2012-13 ports: active: LVDS-1 empty: DP-1, DP-2, DP-3,
    HDMI-A-1, HDMI-A-2, HDMI-A-3, VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: Cheng Uei Precision Industry (Foxlink) HP HD Webcam [Fixed] type: USB
    driver: uvcvideo bus-ID: 1-1.3:4 chip-ID: 05c8:034b class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.65x9.37") s-diag: 485mm (19.11")
  Monitor-1: LVDS-1 model: AU Optronics 0x313e built: 2012 res: 1600x900 hz: 60 dpi: 132
    gamma: 1.2 size: 309x174mm (12.17x6.85") diag: 355mm (14") ratio: 16:9 modes: 1600x900
  API: OpenGL v: 4.2 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
    direct-render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard 7
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 class-ID: 0403
  API: ALSA v: k6.1.0-9-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Centrino Advanced-N 6235 driver: iwlwifi v: kernel modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:088e class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: HP HP hs2350 HSPA+ MobileBroadband type: USB driver: cdc_acm,cdc_ncm,cdc_wdm
    bus-ID: 1-1.5:5 chip-ID: 03f0:3d1d class-ID: 0202 serial: <filter>
  IF: usb0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Centrino Bluetooth Wireless Transceiver type: USB driver: btusb v: 0.8
    bus-ID: 2-1.6:3 chip-ID: 8087:07da class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.0
    sub-v: fc00 hci-v: 4.0 rev: 1ebd
  Info: acl-mtu: 310:10 sco-mtu: 64:8 link-policy: rswitch hold sniff park
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 167.68 GiB used: 25.35 GiB (15.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Intel model: SSDSC2BF180A4H size: 167.68 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: LH6i scheme: MBR
Partition:
  ID-1: / raw-size: 167.67 GiB size: 163.98 GiB (97.80%) used: 25.35 GiB (15.5%) fs: ext4
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 10.62 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:
  System Temperatures: cpu: 61.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2199 pm: dpkg pkgs: 2186 libs: 1140 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 13
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
    1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://ftp.acc.umu.se/mirror/mxlinux.org/packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
Info:
  Processes: 229 Uptime: 4h 56m wakeups: 3 Memory: 7.62 GiB used: 2.42 GiB (31.7%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12 Client: shell wrapper
  v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

User avatar
Eadwine Rose
Administrator
Posts: 14837
Joined: Wed Jul 12, 2006 2:10 am

Re: Edit locale

#7 Post by Eadwine Rose »

As this has replies I will leave it here, but please follow directions in the announcement next time, and post feedback about the beta in the designated beta thread, thank you.
MX-23.6_x64 July 31 2023 * 6.1.0-37amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

Post Reply

Return to “General”