ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



NL_LANGINFO(3)           BSD Library Functions Manual           NL_LANGINFO(3)

NAME
     nl_langinfo, nl_langinfo_l -- language information

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <langinfo.h>

     char *
     nl_langinfo(nl_item item);

     #include <langinfo.h>
     #include <xlocale.h>

     char *
     nl_langinfo_l(nl_item item, locale_t loc);

DESCRIPTION
     The nl_langinfo() function returns a pointer to a string containing information relevant to the partic-ular particular
     ular 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 the buffer pointed to by the return value.

EXAMPLES
     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.

     While the nl_langinfo() function uses the current locale, the nl_langinfo_l() function may be passed a
     locale directly. See xlocale(3) for more information.

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 item
     contains an invalid setting.

SEE ALSO
     setlocale(3), xlocale(3)

STANDARDS
     The nl_langinfo() function conforms to Version 2 of the Single UNIX Specification (``SUSv2'').

HISTORY
     The nl_langinfo() function first appeared in FreeBSD 4.6.

BSD                               May 3, 2001                              BSD

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.