Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Having the possibility to set the system-wide locale settings
Date: Mon, 10 Sep 2012 23:16:13
Message-Id: CAEH5T2MmrkmxYZP1bJJ4ywo=FEPzcYqrj1kc0Z9MN10vgArzyA@mail.gmail.com
In Reply to: Re: [gentoo-user] Having the possibility to set the system-wide locale settings by Chris Stankevitz
1 On Mon, Sep 10, 2012 at 1:20 PM, Chris Stankevitz
2 <chrisstankevitz@×××××.com> wrote:
3 > On Sun, Sep 9, 2012 at 10:05 PM, Joshua Murphy <poisonbl@×××××.com> wrote:
4 >> A 'locale' is a collection of character set, language, date/time
5 >> format, currency format, etc
6 >
7 > Josh,
8 >
9 > Thank you. I now understand what a "locale" is. It is surprising to
10 > me that the string "en_US.UTF8" tells the OS about currency,
11 > date/time, etc. I always thought "UTF8" was just a "character
12 > encoding" (not really sure what that is either but I would not have
13 > guessed that UTF8 describes where the commas go in a currency).
14
15
16 It doesn't, really. :) The locale code is typically composed of the format:
17
18 language_region.encoding
19
20 So for en_US.UTF8, language (en = English), region (US = United
21 States), and encoding (UTF8 = Unicode). In this case the region code
22 is where it will get the information about currency format etc.
23
24 Some places also have an additional script identifier (languages which
25 can be written in both Latin and Cyrillic, for example), and other
26 modifiers are allowed to specify currencies, calendar formats, number
27 system, etc. which might not be easily implied simply by knowing the
28 language and country.