The
nl_langinfo ();
function returns a pointer to a string containing information relevant to
the particular language or cultural area defined in the program's locale.
The manifest constant names and values of
Fa item
are defined in
In langinfo.h .
Calls to
setlocale ();
with a category corresponding to the category of
Fa item ,
or to the
category
LC_ALL
may overwrite buffer pointed by the return value.
RETURN VALUES
In a locale where langinfo data is not defined,
nl_langinfo ();
returns a pointer to the corresponding string in the
POSIX
locale.
In all locales,
nl_langinfo ();
returns a pointer to an empty string if
Fa item
contains an invalid setting.
EXAMPLES
For example:
nl_langinfo(ABDAY_1)
would return a pointer to the string
Qq Li Dom
if the identified language was
Portuguese, and
Qq Li Sun
if the identified language was English.