Web lists-archives.com

Re: kwin language setting?




On 26/06/2017 08:38 μμ, René J.V. Bertin wrote:
On Monday June 26 2017 19:29:00 Nikos Chantziaras wrote:

Can't you just set the LANG environment variable globally? Like in
/etc/profile or whatever is suitable for your specific Linux distro?

Certainly not that globally, but I don't really want to do that even for my own session. Or rather, it's probably done anyway but I'm a bit weird in that I don't want translations for terminal commands.

Actually I'm doing something similar. I want English for everything, except the date on desktop apps. For the terminal, I want en_US date format.

You can configure your desktop environment to use the format you want. For KDE 5, this is configured in System Settings -> Regional Settings -> Formats. Like this:

  http://i.imgur.com/MedQP4E.png

For login shells (meaning terminals, including virtual consoles), I override the stuff (LANG and LC_* variables.) This is done in ~/.bashrc (or whatever file is ONLY sourced for login shells on your system.) For doing this for all users, you would use /etc/bash/bashrc (or perhaps put a new file in /etc/bash/bashrc.d/).

In your case, you would set "Region" to what you want in the KDE configuration. The "Detailed Settings" checkbox should be left unchecked. Then, in your ~/.bashrc (or the global login shell config in /etc), you would use:

  export LANG="en_US.UTF-8"

That means applications will use your System Settings configuration, except terminals/consoles.

Since you're using KDE4, you need to do this in your KDE4 System Settings, not the KDE5 one, since the setting is applied by your Plasma 4 session. KDE5 applications should follow it regardless (as will Gtk and Gnome applications.)