nl_langinfo -- language information
Standard C Library (libc, -lc)
#include <langinfo.h>
char *
nl_langinfo(nl_item item);
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 item
are defined in <langinfo.h>.
Calls to setlocale() with a category corresponding to the category of
item, or to the category LC_ALL, may overwrite buffer pointed by the
return value.
For example:
nl_langinfo(ABDAY_1)
would return a pointer to the string "Dom" if the identified language was
Portuguese, and "Sun" if the identified language was English.
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 item contains an
invalid setting.
setlocale(3)
The nl_langinfo() function conforms to Version 2 of the Single UNIX
Specification (``SUSv2'').
The nl_langinfo() function first appeared in FreeBSD 4.6.
FreeBSD 5.2.1 May 3, 2001 FreeBSD 5.2.1 [ Back ] |