区域设置类别Locale Categories

语法Syntax


#include <locale.h>  

备注Remarks

区域设置类别是本地化例程使用的清单常量,用于指定要使用的程序区域设置信息部分。Locale categories are manifest constants used by the localization routines to specify which portion of a program's locale information will be used. 区域设置是指可为其自定义程序的某些方面的局部性(或国家/地区)。The locale refers to the locality (or Country/Region) for which certain aspects of your program can be customized. 与区域设置相关的部分包括日期的格式设置和货币值的显示格式等。Locale-dependent areas include, for example, the formatting of dates or the display format for monetary values.

区域设置类别Locale category 影响的程序部分Parts of program affected
LC_ALL 所有区域设置特定的行为(所有类别)All locale-specific behavior (all categories)
LC_COLLATE strcollstrxfrm 函数的行为Behavior of strcoll and strxfrm functions
LC_CTYPE 字符处理函数的行为(不受影响的 isdigit、isxdigitmbstowcsmbtowc 除外)Behavior of character-handling functions (except isdigit, isxdigit, mbstowcs, and mbtowc, which are unaffected)
LC_MAX LC_TIME 相同Same as LC_TIME
LC_MIN LC_ALL 相同Same as LC_ALL
LC_MONETARY localeconv 函数返回的货币格式信息Monetary formatting information returned by the localeconv function
LC_NUMERIC 格式化输出例程(例如 printf)、数据转换例程和 localeconv 函数所返回的非货币格式设置信息的小数点字符Decimal-point character for formatted output routines (for example, printf), data conversion routines, and nonmonetary formatting information returned by localeconv function
LC_TIME strftime 函数的行为Behavior of strftime function

有关示例,请参阅 setlocale、_wsetlocaleSee setlocale, _wsetlocale for an example.

另请参阅See Also

localeconv localeconv
setlocale、_wsetlocale setlocale, _wsetlocale
strcoll 函数 strcoll Functions
strftime、wcsftime、_strftime_l、_wcsftime_l strftime, wcsftime, _strftime_l, _wcsftime_l
strxfrm、wcsxfrm、_strxfrm_l、_wcsxfrm_l strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l
全局常量Global Constants