Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setlocale(3)

NL_LANGINFO(3)                  Domain/OS BSD                   NL_LANGINFO(3)



NAME
     nl_langinfo - Language information

SYNOPSIS
     #include <nl_types.h>
     #include <langinfo.h>

     char *nl_langinfo (item)
     nl_item item;

DESCRIPTION
     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 item argument specifies constant names and
     values, which are defined in the langinfo.h header file.

     For example, the following returns a pointer to the abbreviated name of
     the first day of the week in the current locale:

          nl_langinfo(ABDAY_1)

     This function call would return a pointer to the string ``Dom'' if the
     identified language was Portuguese, and ``Sun'' if the identified
     language was English.

DIAGNOSTICS
     In a locale where langinfo data is not defined, the nl_langinfo function
     returns a pointer to the corresponding string in the C locale.  In all
     locales, the nl_langinfo function returns a pointer to an empty string if
     the item argument contains an invalid setting.

NOTES
     The array pointed to by the return value should not be modified by the
     program, but may be modified by further calls to nl_langinfo.  In
     addition, calls to the setlocale(3) function with a category
     corresponding to the category of item (see <langinfo.h>), or to the
     category LC_ALL, may overwrite the array.

SEE ALSO
     setlocale(3),

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026