About locale

What is a locale?

Roughly speaking, the definition of regional formatting rules (currency, date, numerical representation), including language.

Locale name

Represented by language_country.character set.

Locale name meaning
ja_JP.utf8 Japanese
en_US.utf8 English notation in the United States
en_GB.utf8 English notation in the UK
de_DE.utf8 German notation in Germany
de_H.utf8 Swiss German notation
zh_CH.utf8 Simplified characters
zh_TW.utf8 Traditional Chinese

How to check the locale

locale command

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
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="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"
LC_ALL=

LANG environment variable

$ echo $LANG
en_US.UTF-8

locale.conf

$ cat /etc/locale.conf
en_US.UTF-8

How to set the locale

Set with environment variables

$ export LANG=ja_JP.utf8; echo $LANG
ja_JP.utf8

For CentOS

$ localectl set-locale LANG=en_US.utf8; cat /etc/locale.conf
LANG=en_US.utf8

reference

https://eng-entrance.com/linux-localization-locale https://docs.oracle.com/cd/E26924_01/html/E27144/glmbx.html

Recommended Posts

About locale
About LangID
About CAGR
About virtiofs
About python-apt
About sklearn.preprocessing.Imputer
About gunicorn
About requirements.txt
About permissions
About Opencv ②
About axis = 0, axis = 1
About Opencv ③
About import
About numpy
About pip
About Linux
About numpy.newaxis
About endian
About Linux
About import
About Opencv ①
About Linux
About Linux
About Linux ①
About cv2.imread
About _ and __
About wxPython
Notepad about TecoGAN
About python slices
Briefly about __name__
About python comprehension
About Docker Volume
[Linux] About export
About reference type
About Twitter scraping
About the test
Learn about programming
About Flask customization
About variable scope. .. ..
About Python tqdm.
About python yield
Notes about with
About python, class
About Linear Models
About Go functions
About pandas describe
About Kivy root
About Firestore timeout
About python inheritance
About python, range ()
About Confusion Matrix
[Linux] About PATH
About python decorators
Linux (about groups)
Note about awk
About python reference
About Bitnami Autostart
About Python decorators
About Milkcocoa SDK
Notes about pytorch
[Python] About multi-process