|
|
发表于 2005-11-9 12:28:50
|
显示全部楼层
推荐兄弟看这篇文章:
http://www.gentoo.org/doc/en/gui ... xml#doc_chap3_sect3
Environment variables for locales
Locale settings are stored in environment variables. These are typically set in the /etc/env.d/02locale (for system-wide settings) and ~/.bashrc (for user-specific settings) file. The variables controlling different aspects of locale settings are given in the table below, those with highest precedence (ie. those that override settings below them) are at the top of the table. All variables take one name of a locale in ab_CD format given above.
Variable name Explanation
LC_ALL Define all locale settings at once. This is the top level setting for locales which will override any other setting.
LC_COLLATE Define alphabetical ordering of strings. This affects eg. output of sorted directory listing.
LC_CTYPE Define the character handling properties for the system. This determines which characters are seen as part of alphabet, numeric and so on. This also determines the character set used, if applicable.
LC_MESSAGES Programs' localizations for applications that use message based localization scheme (majority of Gnu programs, see next chapters for closer information which do, and how to get the programs, that don't, to work).
LC_MONETARY Defines currency units and formatting of currency type numeric values.
LC_NUMERIC Defines formatting of numeric values which aren't monetary. Affects things such as thousand separator and decimal separator.
LC_TIME Defines formatting of dates and times.
LC_PAPER Defines default paper size.
LANG Defines all locale settings at once. This setting can be overridden by individual LC_* settings above or even by LC_ALL.
Note: Even though most programs work with LC_ALL only, some of them misbehave if LC_ALL is set but LANG isn't. If you want to play safe, set them both.
Most typically users only set the LANG variable and perhaps LC_CTYPE variable on user level by adding definitions to shells startup files defining the environment variable manually from command line:
Code Listing 3.1: setting the German locale
export LANG="de_DE@euro"
Note: Append @euro to your locale if you want to use the Euro currency symbol |
|