Gentoo Archives: gentoo-user

From: Christopher Swift <christopher.swift@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Questions regarding the usage of multiple locales
Date: Tue, 22 Jun 2010 17:06:18
Message-Id: 1277223253.1816.3.camel@tonmawr
In Reply to: Re: [gentoo-user] Questions regarding the usage of multiple locales by Mick
1 Ar Maw, 2010-06-22 am 14:38 +0100, ysgrifennodd Mick:
2 > I'm also interested in this - although my question is probably simpler:
3 >
4 > I would like to use en_GB but I do not undestand why running 'locale'
5 > as a plain user shows:
6 >
7 > $ locale
8 > LANG=en_US.UTF-8
9 > LC_CTYPE="en_US.UTF-8"
10 > LC_NUMERIC="en_US.UTF-8"
11 > LC_TIME="en_US.UTF-8"
12 > LC_COLLATE="en_US.UTF-8"
13 > LC_MONETARY="en_US.UTF-8"
14 > LC_MESSAGES="en_US.UTF-8"
15 > LC_PAPER="en_US.UTF-8"
16 > LC_NAME="en_US.UTF-8"
17 > LC_ADDRESS="en_US.UTF-8"
18 > LC_TELEPHONE="en_US.UTF-8"
19 > LC_MEASUREMENT="en_US.UTF-8"
20 > LC_IDENTIFICATION="en_US.UTF-8"
21 > LC_ALL=en_US.UTF-8
22 >
23 > why when running it as root:
24 >
25 > # locale
26 > LANG=
27 > LC_CTYPE="POSIX"
28 > LC_NUMERIC="POSIX"
29 > LC_TIME="POSIX"
30 > LC_COLLATE="POSIX"
31 > LC_MONETARY="POSIX"
32 > LC_MESSAGES="POSIX"
33 > LC_PAPER="POSIX"
34 > LC_NAME="POSIX"
35 > LC_ADDRESS="POSIX"
36 > LC_TELEPHONE="POSIX"
37 > LC_MEASUREMENT="POSIX"
38 > LC_IDENTIFICATION="POSIX"
39 > LC_ALL=
40 >
41 >
42 > I do not have set a /etc/env.d/02locale yet, so where is my plain user
43 > locale being read from?
44 Your plain user locale is usually read from ~/.bashrc, this can be set
45 to en_GB by having the following lines:
46 export LANG="en_GB.UTF-8"
47 export LC_COLLATE="C"
48
49 This will only affect that user but if you want to define a locale globally you have to adjust the file in /etc/env.d/02locale to have the top two lines read this:
50 LANG="en_GB.UTF-8"
51 LC_COLLATE="C"
52
53 After you've done that do "env-update && source /etc/profile" for the global settings or just source ~/.bashrc for the user's settings.
54
55 Hope this helps
56 --
57 Cofion
58
59 Christopher Swift (ianto) - christopher dot swift at linux dot com

Replies

Subject Author
Re: [gentoo-user] Questions regarding the usage of multiple locales Mick <michaelkintzios@×××××.com>