C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
setlocale
 Summary                                   Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The setlocale function sets the categories specified by <category>
     to the locale specified by <locale>. The "locale" refers to the
     locality (country and language) for which certain aspects of your
     program can be customized. Some locale-dependent aspects include
     the formatting of dates and the display format for monetary values.
 
     The setlocale function is used to set or get the program's current
     entire locale or simply portions of the locale information. The
     <category> argument specifies which portion of a program's locale
     information will be affected. The macros used for the <category>
     argument are listed below:
 
     LC_ALL         LC_MONETARY
     LC_COLLATE     LC_NUMERIC
     LC_CTYPE       LC_TIME
 
     (See Locale Categories for more information on these constants.)
 
     The <locale> argument is a pointer to a string specifying the name
     of the locale. If <locale> is an empty string, the locale is the
     implementation-defined native environment. A value of "C"
     specifies the minimal ANSI-conforming environment for C
     translation. This is the only locale supported in Microsoft C/C++.
 
     If the <locale> argument is a null pointer, setlocale returns a
     pointer to the string associated with the category of the
     program's locale. The program's current locale setting is not
     changed.
 
     Return Value
 
     If a valid locale and category are given, setlocale returns a
     pointer to the string associated with the specified category for
     the previous locale. If the locale or category is invalid, the
     setlocale function returns a null pointer and the program's
     current locale settings are not changed.
 
     The pointer to a string returned by setlocale can be used in
     subsequent calls to restore that part of the program's locale
     information, assuming that your program does not alter the
     pointer or the string. Later calls to setlocale will overwrite
     the string; you can use the _strdup function to save a specific
     locale string.
                                    -♦-