Setting LANG env on Ubuntu
Shachar Shemesh
shachar at shemesh.biz
Sat Sep 26 23:15:50 IDT 2009
Diego Iastrubni wrote:
> On Friday 25 September 2009 00:15:40 Shachar Shemesh wrote:
>
>> I don't know about Ubuntu, but in Debian these variables are set either
>> in /etc/default/locale or /etc/environment. Also, the "official" way of
>> changing those is by doing "dpkg-reconfigure locales" as root.
>>
>
> On Debian/Ubuntu, "dpkg-reconfigure locales" is a light wrapper around
> localgegen (I think, I am currently on Fedora...). On Mandriva, you can
> install each one of those locales by an rpm instead of generating them on your
> machine. If you want to change the locale of your system, this is a mandatory
> step.
>
> However it does not change the locale.
localegen doesn't. dpkg-reconfigure locales does. It does both.
> What I usually do (works on
> Debian/Ubuntu/Mandriva/Fedora) is:
>
> locale > ~/.i18n
>
> and then edit ~/.i18n as needed. Here it is on my machine:
> [elcuco at pinky ~] cat /home/elcuco/.i18n
> LANG=en_US.UTF-8
>
Okay. Not optimal, but will do.
> LC_CTYPE="he_IL.UTF-8"
>
Yes, that usually complements the first.
> 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="he_IL.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"
>
Unnecessary. These default to the locale if not set.
> LC_ALL=
>
Dangerous. If this is set, it overrides everything else.
Personally, I think setting LANG to he_IL.UTF-8, and then set
LC_MESSAGES to en_US to make the interface language remain in English.
And if you want it set globally, /etc/default/locale is still a better
place to put these lines.
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090926/f8e7e031/attachment.html>
More information about the Linux-il
mailing list