[Linux-Anyway] Re: Searched & searched for locale....

  • From: Godwin Stewart <gstewart@xxxxxxxxxxx>
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Mon, 8 Dec 2003 09:58:04 +0100

Sat, 30 Jun 2018 16:52:17 -0700 (PDT) scripsit Meph Istopheles:

>   I've entered LANG=pl_PL.iso-8859-2 in my ~/.bash_profile for
> Polish support, & export LANG=en_GB in ~/.bashrc for language,
> but locale is still screwed.

One is going to override the other here.

.bash_profile is going to source .bashrc and set the locale to en_GB, then
control will return to .bash_profile and clobber en_GB with pl_PL.

In Slackware, however, you'll see a script called lang.sh in your
/etc/profile.d directory. This will allow you to set locale settings
system-wide. Why? Because /etc/profile is run whenever someone logs in, and
if the shell is bash, it also runs all the *.sh scripts in /etc/profile.d.
It then goes on to run user-specific stuff in ~/.bash_profile.

Now, if you want Polish support but messages displayed in English, you could
stuff this in /etc/profile.d/lang.sh:

export LANG=pl_PL.iso-8859-2
export LC_MESSAGES=en_GB

-- 
G. Stewart   --   gstewart@xxxxxxxxxxx -- gstewart@xxxxxxxxxxx
Registered Linux user #284683 (Slackware 9.0)
---------------------------------------------------------------
"I don't understand that attitude.  Don't we want email that has dancing
 bears, cute little videos, musical tunes, animated waving hands, sixty
 fonts, and looks like it's been done with crayolas? Good grief, man,
 think like a three year old!"
                                   -- Norm Reitzel discussing HTML email
To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts: