Standard C++ Library Reference ISO/IEC (VERSION3)
locale(const locale& loc, const char *locname, category cat);
template<class Facet>
locale(const locale& loc, Facet *fac);
template<class Facet>
locale combine(const locale& loc) const;
template<class Elem, class Tr, class Alloc>
bool operator()(const basic_string<Elem, Tr, Alloc>& left,
const basic_string<Elem, Tr, Alloc>& right) const;
string name() const;
bool operator==(const locale& right) const;
bool operator!=(const locale& right) const;
static locale global(const locale& right);
static const locale& classic();
};
The class describes a locale object that encapsulates a locale. It represents culture-specific information as a list of facets.
A facet is a pointer to an object of a class derived from class facet that has a public object of the form:
static locale::id id;
You can define an open-ended set of these facets. You can also construct a locale object that designates an arbitrary
number of facets.
Predefined groups of these facets represent the locale categories traditionally managed in the Standard C library by the
function setlocale.
Category collate (LC_COLLATE) includes the facets:
collate<char>
collate<wchar_t>
Category ctype (LC_CTYPE) includes the facets:
ctype<char>
ctype<wchar_t>
codecvt<char, char, mbstate_t>
codecvt<wchar_t, char, mbstate_t>
Category monetary (LC_MONETARY) includes the facets:
moneypunct<char, false>
moneypunct<wchar_t, false>
moneypunct<char, true>
moneypunct<wchar_t, true>
money_get<char, istreambuf_iterator<char> >
money_get<wchar_t, istreambuf_iterator<wchar_t> >
money_put<char, ostreambuf_iterator<char> >
money_put<wchar_t, ostreambuf_iterator<wchar_t> >
Category numeric (LC_NUMERIC) includes the facets:
num_get<char, istreambuf_iterator<char> >
num_get<wchar_t, istreambuf_iterator<wchar_t> >
num_put<char, ostreambuf_iterator<char> >
num_put<wchar_t, ostreambuf_iterator<wchar_t> >
numpunct<char>
numpunct<wchar_t>
Category time (LC_TIME) includes the facets:
time_get<char, istreambuf_iterator<char> >