DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

nl_langinfo(S)


nl_langinfo -- language information

Syntax

cc ... -lc

#include <langinfo.h>

char *nl_langinfo(nl_item item);

Description

The nl_langinfo routine returns a pointer to a null terminated string that contains information relevant to a particular language or cultural area identified by the last successful call to setlocale or nl_init. The constant names and values of item are defined in the file langinfo.h.

Example

The following statement sets a character pointer called day to point to the string Dom if the identified language is Portuguese or Sun if the identified language is English.
   day = nl_langinfo(ABDAY_1)
If the parameter is not a valid item, nl_langinfo returns a pointer to an empty (null) string.

See also

environ(M), langinfo(FP), nl_init(S), nl_types(FP), setlocale(S)

Standards conformance

nl_langinfo is conformant with:

X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003