Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Headerslanginfo(3HEAD)


NAME

 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_TIMEname of the first day of the week (for example, Sunday)
DAY_2LC_TIMEname of the second day of the week (for example, Monday)
DAY_3LC_TIMEname of the third day of the week (for example, Tuesday)
DAY_4LC_TIMEname of the fourth day of the week (for example, Wednesday)
DAY_5LC_TIMEname of the fifth day of the week (for example, Thursday)
DAY_6LC_TIMEname of the sixth day of the week (for example, Friday)
DAY_7LC_TIMEname of the seventh day of the week (for example, Saturday)
ABDAY_1LC_TIMEabbreviated name of the first day of the week
ABDAY_2LC_TIMEabbreviated name of the second day of the week
ABDAY_3LC_TIMEabbreviated name of the third day of the week
ABDAY_4LC_TIMEabbreviated name of the fourth day of the week
ABDAY_5LC_TIMEabbreviated name of the fifth day of the week
ABDAY_6LC_TIMEabbreviated name of the seventh day of the week
ABDAY_7LC_TIMEabbreviated 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
tblbrABMON_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_MONETARYlocal 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.

SEE ALSO

 

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


SunOS 5.9Go To TopLast Changed 12 Sep 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.