Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (n - r) nl_langinfo(3)
NAME
nl_langinfo - Provides national language information
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <langinfo.h>
char *nl_langinfo(
nl_item item);
PARAMETERS
item Specifies constant names and values.
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 structures, constant
names, and values of the item parameter are defined in the langinfo.h header file.
EXAMPLES
Use the following to return a pointer to the abbreviated name of the first day of the week in the
current locale:
nl_langinfo(ABDAY_1)
This function call returns a pointer to the string "Dom" if the identified language was Portuguese,
"Sun" if the identified language was English, and so on.
RETURN VALUES
In a locale where langinfo data is not defined, the nl_langinfo( ) function returns a pointer to the
corresponding string in the C/POSIX locale. In all locales, the nl_langinfo( ) function returns a
pointer to an empty string if the item parameter contains an invalid setting.
RELATED INFORMATION
Functions: setlocale(3).
527187-017 Hewlett-Packard Company 531