The standard library supports the development of C programs that are able to adapt to local cultural conventions. For example, programs may use locale-specific character sets or formats for currency information.
All programs start in the default locale, named "C", which contains no country or language-specific information. During runtime, programs can change their locale or query information about the current locale. The information that makes up a locale is divided into categories, which you can query and set individually.
The functions that operate on the current locale are declared, along with the related types and macros, in the header locale.h. They are listed in Table 16-26.
Many functions make use of locale-specific information. The standard library function descriptions in Chapter 17 point out whenever a given function accesses locale settings. Such functions include the following: