Home > OS >  Linux in the locale command
Linux in the locale command

Time:09-24

In Linux, the language is divided into 12 categories can use the locale command to see

1, language symbols and classification (LC_CTYPE)
2, the digital LC_NUMERIC)
3, compare and habit (LC_COLLATE)
4, the time display format (LC_TIME)
5, monetary unit (LC_MONETARY)
6, the information is mainly, error messages, state information, the title, tags, buttons and menus, etc (LC_MESSAGES)
7, name writing (LC_NAME)
8, address writing (LC_ADDRESS)
9, telephone number, writing (LC_TELEPHONE)
10 and the expression of weights and measures (LC_MEASUREMENT)
11, the default paper size (LC_PAPER)
12, the general overview of the locale itself contains information (LC_IDENTIFICATION),

Among them about LC_ALL, LANG and LC_ * priority is as follows:
LC_ * : it means all the environment variables begin with LC_

LC_ALL & gt; LC_ * & gt; LANG,

1, change the contents of the LANG environment variables can let LC_ * together change
2, the content of the modified LC_ALL environment variables can let LC_ * all change together, priority is higher than LANG

Chinese LANG variable can be set to:
GBK zh_CN.
Zh_CN. Utf-8
Zh_CN. Gb18030

English LANG variables can be set to
En_US. Utf-8

Naming principles:
Such as: zh_CN utf-8
Useful on behalf of the Chinese, CN on behalf of the mainland, the character set GBK said

As in the attached - 5.6 in the system cannot be modified, the modified/etc/profile file
Add the following statement at the end of the file
Export LC_ALL="GBK zh_CN."
Export LANG="GBK zh_CN."
. Restart the computer can!
  • Related