locale.h, this function selects
the appropriate locale as specified by the
setlocale() function is used to change
or query part or all of the current locale. The effect of the
for each value is:
Affects the behavior of
Affects the behavior of the character handling functions.
Affects the monetary formatting information returned by
Affects the decimal-point character for the formatted input/output functions and the string conversion functions and the numeric formatting information returned by
Can affect the behavior of
strftime(). For currently supported locales, the option has no effect.
Affects all locale categories. This is the bitwise OR of all the locale categories.
A value of
the minimal environment for C translation. An empty string,
locale specifies the implementation-defined
native environment. At program startup, the equivalent of
"C") is executed.
depend on which
are imported (
and on user-defined locales.
If a pointer to a string is given for
the selection is valid, the string associated with the specified
category for the new locale is returned. If the selection cannot
be honored, a null pointer is returned and the locale is not changed.
A null pointer for
the string associated with the category for the current locale to be
returned and the locale is not changed.
the most recent successful locale-setting call uses a category other
LC_ALL, a composite string might be returned.
The string returned when used in a subsequent call with its associated
category restores that part of the program locale. The string returned
is not modified by the program, but might be overwritten by a subsequent