This is used to change the behaviour of the functions strcoll() and strxfrm(), which are used to compare strings in the local alphabet. For example, the German sharp s is sorted as "ss".
This changes the behaviour of the character handling and classification functions, such as isupper() and toupper(), and the multi-byte character functions such as mblen() or wctomb().
changes the information returned by localeconv() which describes the way numbers are usually printed, with details such as decimal point versus decimal comma. This information is internally used by the function strfmon().
changes the language messages are displayed in and how an affirmative or negative answer looks like. The GNU C-library contains the gettext(), ngettext(), and rpmatch() functions to ease the use of these information. The GNU gettext family of functions also obey the environment variable LANGUAGE.
changes the information used by the printf() and scanf() family of functions, when they are advised to use the locale-settings. This information can also be read with the localeconv() function.
changes the behaviour of the strftime() function to display the current time in a locally acceptable form; for example, most of Europe uses a 24-hour clock vs. the US 12-hour clock.
All of the above.
If the second argument to setlocale() is empty string, """""", for the default locale, it is determined using the following steps:
If there is a non-null environment variable LC_ALL, the value of LC_ALL is used.
If an environment variable with the same name as one of the categories above exists and is non-null, its value is used for that category.
If there is a non-null environment variable LANG, the value of LANG is used.
Values about local numeric formatting is made available in a struct lconv returned by the localeconv() function, which has the following declaration:
/* Numeric (non-monetary) information. */
char *decimal_point;/* Decimal point character. */
char *thousands_sep;/* Thousands separator. */
/* Each element is the number of digits in each group;
elements with higher indices are farther left.
An element with value CHAR_MAX means that no further grouping is done.
An element with value 0 means that the previous element is used
for all groups farther left. */
/* Monetary information. */
/* First three chars are a currency symbol from ISO 4217.
Fourth char is the separator. Fifth char is . */
char *currency_symbol; /* Local currency symbol. */
char *mon_decimal_point; /* Decimal point character. */
char *mon_thousands_sep; /* Thousands separator. */
char *mon_grouping; /* Like grouping element (above). */
char *positive_sign;/* Sign for positive values. */
char *negative_sign;/* Sign for negative values. */
char int_frac_digits; /* Intl fractional digits. */
char frac_digits; /* Local fractional digits. */
/* 1 if currency_symbol precedes a positive value, 0 if succeeds. */
/* 1 if a space separates currency_symbol from a positive value. */
/* 1 if currency_symbol precedes a negative value, 0 if succeeds. */
/* 1 if a space separates currency_symbol from a negative value. */
/* Positive and negative sign positions:
0 Parentheses surround the quantity and currency_symbol.
1 The sign string precedes the quantity and currency_symbol.
2 The sign string succeeds the quantity and currency_symbol.
3 The sign string immediately precedes the currency_symbol.
4 The sign string immediately succeeds the currency_symbol. */