#include <locale.h>char *setlocale(int type, const char *locale);

The setlocale( ) function allows certain parameters that are sensitive to the geopolitical environment of a program’s execution to be queried or set. If locale is null, setlocale( ) returns a pointer to the current localization string. Otherwise, setlocale( ) attempts to use the string specified by locale to set the locale parameters as specified by type. To specify the standard C locale, use the string "C". To specify the native environment, use the null-string "". Refer to your compiler’s documentation for the localization strings that it supports.

At the time of the call, type must be one of the following macros (defined in <locale.h>):


LC_ALL refers to all localization categories. LC_COLLATE affects the operation of the strcoll( ) function. LC_CTYPE alters the way the character functions work. LC_MONETARY determines the monetary format. LC_NUMERIC changes the decimal-point character for formatted input/output functions. Finally, LC_TIME determines the behavior of the strftime( ) function.

The setlocale( ) function returns a pointer to a string associated with the type parameter.

Related functions are localeconv( ), time( ), strcoll( ), and strftime( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539 © 2008-2017.
If you may any questions please contact us: