Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nl_langinfo(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setlocale

langinfo.h

nl_types.h



NL_LANGINFO(3,L)            AIX Technical Reference            NL_LANGINFO(3,L)



-------------------------------------------------------------------------------
nl_langinfo



PURPOSE

Returns a pointer to a string containing language information.

SYNTAX

#include <langinfo.h>
#include <locale.h>
#include <stdio.h>

char *nl_langinfo (var_id)
int var_id;

DESCRIPTION

The nl_langinfo subroutine returns a pointer to a string containing information
about the particular language or cultural area defined in the program's locale.
The manifest constant names and values of items are defined in langinfo.h.

The following items of cultural data are defined in this locale:

+---------+--------------+---------------------+
|Item     | Category     | Setting             |
+---------+--------------+---------------------+
|D_T_FMT  | LC_TIME      | "%a%b%d%H:%M:0Y"  |
+---------+--------------+---------------------+
|D_FMT    | LC_TIME      | "%m/%d/%y"          |
+---------+--------------+---------------------+
|T_FMT    | LC_TIME      | "%H:%M:%S"          |
+---------+--------------+---------------------+
|AM_STR   | LC_TIME      | "AM"                |
+---------+--------------+---------------------+
|PM_STR   | LC_TIME      | "PM"                |
+---------+--------------+---------------------+
|DAY_1    | LC_TIME      | "Sunday"            |
+---------+--------------+---------------------+
|DAY_2    | LC_TIME      | "Monday"            |
+---------+--------------+---------------------+
|DAY_3    | LC_TIME      | "Tuesday"           |
+---------+--------------+---------------------+
|DAY_4    | LC_TIME      | "Wednesday"         |
+---------+--------------+---------------------+
|DAY_5    | LC_TIME      | "Thursday"          |
+---------+--------------+---------------------+
|DAY_6    | LC_TIME      | "Friday"            |
+---------+--------------+---------------------+




Processed November 7, 1990     NL_LANGINFO(3,L)                               1





NL_LANGINFO(3,L)            AIX Technical Reference            NL_LANGINFO(3,L)



+---------+--------------+---------------------+
|Item     | Category     | Setting             |
+---------+--------------+---------------------+
|DAY_7    | LC_TIME      | "Saturday"          |
+---------+--------------+---------------------+
|ABDAY_1  | LC_TIME      | "Sun"               |
+---------+--------------+---------------------+
|ABDAY_2  | LC_TIME      | "Mon"               |
+---------+--------------+---------------------+
|ABDAY_3  | LC_TIME      | "Tue"               |
+---------+--------------+---------------------+
|ABDAY_4  | LC_TIME      | "Wed"               |
+---------+--------------+---------------------+
|ABDAY_5  | LC_TIME      | "Thu"               |
+---------+--------------+---------------------+
|ABDAY_6  | LC_TIME      | "Fri"               |
+---------+--------------+---------------------+
|ABDAY_7  | LC_TIME      | "Sat"               |
+---------+--------------+---------------------+
|MON_1    | LC_TIME      | "January"           |
+---------+--------------+---------------------+
|MON_2    | LC_TIME      | "February"          |
+---------+--------------+---------------------+
|MON_3    | LC_TIME      | "March"             |
+---------+--------------+---------------------+
|MON_4    | LC_TIME      | "April"             |
+---------+--------------+---------------------+
|MON_5    | LC_TIME      | "May"               |
+---------+--------------+---------------------+
|MON_6    | LC_TIME      | "June"              |
+---------+--------------+---------------------+
|MON_7    | LC_TIME      | "July"              |
+---------+--------------+---------------------+
|MON_8    | LC_TIME      | "August"            |
+---------+--------------+---------------------+
|MON_9    | LC_TIME      | "September"         |
+---------+--------------+---------------------+
|MON_10   | LC_TIME      | "October"           |
+---------+--------------+---------------------+
|MON_11   | LC_TIME      | "November"          |
+---------+--------------+---------------------+
|MON_12   | LC_TIME      | "December"          |
+---------+--------------+---------------------+
|ABMON_1  | LC_TIME      | "Jan"               |
+---------+--------------+---------------------+
|ABMON_2  | LC_TIME      | "Feb"               |
+---------+--------------+---------------------+
|ABMON_3  | LC_TIME      | "Mar"               |
+---------+--------------+---------------------+
|ABMON_4  | LC_TIME      | "Apr"               |
+---------+--------------+---------------------+




Processed November 7, 1990     NL_LANGINFO(3,L)                               2





NL_LANGINFO(3,L)            AIX Technical Reference            NL_LANGINFO(3,L)



+---------+--------------+---------------------+
|Item     | Category     | Setting             |
+---------+--------------+---------------------+
|ABMON_5  | LC_TIME      | "May"               |
+---------+--------------+---------------------+
|ABMON_6  | LC_TIME      | "Jun"               |
+---------+--------------+---------------------+
|ABMON_7  | LC_TIME      | "Jul"               |
+---------+--------------+---------------------+
|ABMON_8  | LC_TIME      | "Aug"               |
+---------+--------------+---------------------+
|ABMON_9  | LC_TIME      | "Sep"               |
+---------+--------------+---------------------+
|ABMON_10 | LC_TIME      | "Oct"               |
+---------+--------------+---------------------+
|ABMON_11 | LC_TIME      | "Nov"               |
+---------+--------------+---------------------+
|ABMON_12 | LC_TIME      | "Dec"               |
+---------+--------------+---------------------+
|RADIXCHAR| LC_NUMERIC   | "."                 |
+---------+--------------+---------------------+
|THOUSEP  | LC_NUMERIC   | ""                  |
+---------+--------------+---------------------+
|YESSTR   | LC_ALL       | "yes"               |
+---------+--------------+---------------------+
|NOSTR    | LC_ALL       | "no"                |
+---------+--------------+---------------------+
|CRNCYSTR | LC_MONETARY  | ""                  |
+---------+--------------+---------------------+

RETURN VALUE

If the setlocale subroutine has not initialized the program's locale, the
nl_langinfo subroutine returns a pointer to the corresponding string in the C
locale.  In all locales, the nl_langinfo subroutine returns a pointer to an
empty string if an item contains an invalid setting.

RELATED INFORMATION

In this book:  "setlocale,"  "langinfo.h," and  "nl_types.h."

AIX Guide to Multibyte Character Set (MBCS) Support.













Processed November 7, 1990     NL_LANGINFO(3,L)                               3



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