langinfo.h.3head revision c10c16dec587a0662068f6e2991c29ed3a9db943
te
Copyright 1989 AT&T. Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
langinfo.h 3HEAD "30 Aug 2002" "SunOS 5.11" "Headers"
NAME
langinfo.h, langinfo - language information constants
SYNOPSIS

#include <langinfo.h>
DESCRIPTION

The <langinfo.h> header contains the constants used to identify items of langinfo data (see nl_langinfo(3C)). The type of the constant, nl_item, is defined as described in <nl_types.h>.

The following constants are defined. The entries under Category indicate in which setlocale(3C) category each item is defined.

ConstantCategoryMeaning
CODESETLC_CTYPEcodeset name
D_T_FMTLC_TIMEstring for formatting date and time
D_FMTLC_TIMEdate format string
T_FMTLC_TIMEtime format string
T_FMT_AMPMLC_TIMEa.m. or p.m. time format string
AM_STRLC_TIMEante-meridiem affix
PM_STRLC_TIMEpost-meridiem affix
DAY_1LC_TIME
name of the first day of the week (for example, Sunday)
DAY_2LC_TIME
name of the second day of the week (for example, Monday)
DAY_3LC_TIME
name of the third day of the week (for example, Tuesday)
DAY_4LC_TIME
name of the fourth day of the week (for example, Wednesday)
DAY_5LC_TIME
name of the fifth day of the week (for example, Thursday)
DAY_6LC_TIME
name of the sixth day of the week (for example, Friday)
DAY_7LC_TIME
name of the seventh day of the week (for example, Saturday)
ABDAY_1LC_TIME
abbreviated name of the first day of the week
ABDAY_2LC_TIME
abbreviated name of the second day of the week
ABDAY_3LC_TIME
abbreviated name of the third day of the week
ABDAY_4LC_TIME
abbreviated name of the fourth day of the week
ABDAY_5LC_TIME
abbreviated name of the fifth day of the week
ABDAY_6LC_TIME
abbreviated name of the seventh day of the week
ABDAY_7LC_TIME
abbreviated name of the seventh day of the week
MON_1LC_TIMEname of the first month of the year
MON_2LC_TIMEname of the second month
MON_3LC_TIMEname of the third month
MON_4LC_TIMEname of the fourth month
MON_5LC_TIMEname of the fifth month
MON_6LC_TIMEname of the sixth month
MON_7LC_TIMEname of the seventh month
MON_8LC_TIMEname of the eighth month
MON_9LC_TIMEname of the ninth month
MON_10LC_TIMEname of the tenth month
MON_11LC_TIMEname of the eleventh month
MON_12LC_TIMEname of the twelfth month
ABMON_1LC_TIMEabbreviated name of the first month
ABMON_2LC_TIMEabbreviated name of the second month
ABMON_3LC_TIMEabbreviated name of the third month
ABMON_4LC_TIMEabbreviated name of the fourth month
ABMON_5LC_TIMEabbreviated name of the fifth month
ABMON_6LC_TIMEabbreviated name of the sixth month
ABMON_7LC_TIMEabbreviated name of the seventh month
ABMON_8LC_TIMEabbreviated name of the eighth month
ABMON_9LC_TIMEabbreviated name of the ninth month
ABMON_10LC_TIMEabbreviated name of the tenth month
ABMON_11LC_TIMEabbreviated name of the eleventh month
ABMON_12 LC_TIMEabbreviated name of the twelfth month
ERALC_TIMEera description segments
ERA_D_FMTLC_TIMEera date format string
ERA_D_T_FMTLC_TIMEera date and time format string
ERA_T_FMTLC_TIMEera time format string
ALT_DIGITSLC_TIMEalternative symbols for digits
RADIXCHARLC_NUMERICradix character
THOUSEPLC_NUMERICseparator for thousands
YESEXPRLC_MESSAGESaffirmative response expression
NOEXPRLC_MESSAGESnegative response expression
YESSTRLC_MESSAGESaffirmative response for yes/no queries
NOSTRLC_MESSAGESnegative response ro yes/no queries
CRNCYSTRLC_MONETARY
local currency symbol, preceded by '-' if the symbol sould appear before the value, '+' if the symbol should appear after the value, or '.' if the symbol should replace the radix character

If the locale's values for p_cs_precedes and n_cs_precedes do not match, the value of nl_langinfo(CRNCYSTR) is unspecified.

The <langinfo.h> header declares the following as a function:

char *nl_langinfo(nl_item);

Inclusion of <langinfo.h> header may also make visible all symbols from <nl_types.h>.

USAGE

Wherever possible, users are advised to use functions compatible with those in the ISO C standard to access items of langinfo data. In particular, the strftime(3C) function should be used to access date and time information defined in category LC_TIME. The localeconv(3C) function should be used to access information corresponding to RADIXCHAR, THOUSEP, and CRNCYSTR.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStandard
SEE ALSO

mkmsgs(1), localeconv(3C), nl_langinfo(3C), nl_types.h(3HEAD), setlocale(3C), strftime(3C), attributes(5), standards(5)