object encompasses a set of features that are culture-specific, which can be used by programs to enhance international portability (see localization library
for more info).
The localization engine, on construction of a locale
object, initializes all the facets
associated with it (if necessary) and makes them available to the program.
objects are generally constructed from a name (the same as the one that would be used with clocale
), or from another locale
object. They can also mix facets from more than one locale
Every program has a single locale
object which is its global locale
. On start, this is the classic
locale, but this can be changed using locale::global
. This global locale is copied to any locale
object constructed with its default constructor.
The global locale also affects the C locale (see clocale
): When a new named global locale is set with locale::global
, the C locale is also modified.
objects can be used to access their associated facets in order to use their formatting features. They can also be imbued individually to specific stream objects (such as cin
or a file stream
) by calling the stream's imbue
See localization library
for more information on locales and facets.
- Locale constructor (public member function)
- Locale destructor (public member function)
- Get classic locale [static] (public static member function)
- Construct copy of locale modifying one facet (public member function)
- Set global locale [static] (public static member function)
- Get locale name (public member function)
- Compare locales (public member function)
- Compare strings using locale (public member function)
- Copy locale (public member function)
- Comparison operator (public member function)
- Locale category (public member type)
- Locale facet (public member class)
- Locale facet id (public member class)