4.1. Locale About

$100
100 zł
100.00
100,00
1000000
1 000 000
1.000.000
1,000,000
1'000'000
10k
10.5k
10kk
10M

Number grouping (mind Indian numeric system [1]):

1.000.000
10.00.000

World vs Indian:

../../_images/locale-about-numbering-worldwide.png

Figure 4.27. Source: [2]

../../_images/locale-about-numbering-indian.png

Figure 4.28. Source: [2]

Polish vs English:

Polish      | English
------------+--------------
tysiąc      | thousand
milion      | milion
miliard     | bilion
bilion      | trillion
biliard     | quadrillion
trylion     | quintillion
tryliard    | sextillion

4.1.1. Syntax

  • language (i18n)

  • variant (l10n)

  • encoding (enctype)

en_US.UTF-8
en_GB.UTF-8
en_AU.UTF-8
en_NZ.UTF-8
pl_PL.UTF-8
pl_PL.ISO-8859-2
pl_PL.CP1250

4.1.2. Get Locale

$ locale
LANG=""
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
$ env |grep LC_
LC_ALL=en_US.UTF-8
LC_CTYPE=UTF-8

4.1.3. Set Locale

$ echo 'export LC_ALL=en_US.UTF-8' >> ~/.profile
ls -R /etc/locale*

4.1.4. Locale in Python

import locale

4.1.5. Further Reading

4.1.6. References