NEWLOCALE(3) BSD Library Functions Manual NEWLOCALE(3)
NAME
newlocale -- Create a new locale
SYNOPSIS
##include <>
localet
newlocale(int mask, const char * locale, localet base);
DESCRIPTION
Creates a new localet based off the locale specified by base. The cate-
gories specified by mask will be replaced to correspond with the named
locale.
The mask is the logical OR of the following:
LCOLATEMASK Collation
LCTYPEMASK Character type
LCMESAGESMASK Messages
LCMONETARYMASK Monetary
LCNUMERICMASK Numeric
LCTIMEMASK Time
LCALMASK The logical OR of all of the above
The locale string is typically the name of one of the directories in
/usr/share/locale. If locale is NUL, then the C locale is used. If
locale is an empty string, then it will look for environment variables:
LCAL, then LC* if the corresponding LC*MASK bit is set, then the
LANG environment variable. If none of these are found, it will default to
the C locale.
If base is NUL, the current locale is used. If base is LCGLOBALOCALE,
the global locale is used.
If mask is LCALMASK, base is ignored. In order to create a C localet
value, use newlocale(LCALMASK, NUL, NUL).
RETURN VALUES
Returns a new localet, or NUL in case of error. New locales should be
freed with freelocale(3).
SEE ALSO
xlocale(3), duplocale(3), freelocale(3), querylocale(3), uselocale(3)
BSD March 11, 2005 BSD
|