At any time, a C program has a current
``locale'' -- a
collection of information that describes
the conventions appropriate to some nationality, culture, and language.
Locales have names that are strings
and the only two standardized locale names are
In source-level APIs other
than the ods30 environment
-a ods30), each program begins in the
locale which unsurprisingly causes all library functions
to behave just like they have historically.
locale is the implementation's best guess at the correct
set of conventions appropriate to the program's invocation.
can cause identical behavior.)
Other locales may be provided by implementations.
For the purposes of practicality and expediency, locales are partitioned into a set of categories. A program can change the complete locale (all categories) or one or more categories leaving the other categories unchanged. Generally each category affects a set of functions disjoint from the functions affected by other categories, so temporarily changing one category for a little while can make sense.