1<langinfo.h>(P) POSIX Programmer's Manual <langinfo.h>(P)
2
3
4
6 langinfo.h - language information constants
7
9 #include <langinfo.h>
10
12 The <langinfo.h> header contains the constants used to identify items
13 of langinfo data (see nl_langinfo()). The type of the constant,
14 nl_item, shall be defined as described in <nl_types.h> .
15
16 The following constants shall be defined. The entries under Category
17 indicate in which setlocale() category each item is defined.
18
19 Constant Category Meaning
20 CODESET LC_CTYPE Codeset name.
21 D_T_FMT LC_TIME String for formatting date and time.
22 D_FMT LC_TIME Date format string.
23 T_FMT LC_TIME Time format string.
24 T_FMT_AMPM LC_TIME a.m. or p.m. time format string.
25 AM_STR LC_TIME Ante-meridiem affix.
26 PM_STR LC_TIME Post-meridiem affix.
27 DAY_1 LC_TIME Name of the first day of the week (for
28 example, Sunday).
29 DAY_2 LC_TIME Name of the second day of the week (for
30 example, Monday).
31 DAY_3 LC_TIME Name of the third day of the week (for
32 example, Tuesday).
33 DAY_4 LC_TIME Name of the fourth day of the week
34 (for example, Wednesday).
35 DAY_5 LC_TIME Name of the fifth day of the week (for
36 example, Thursday).
37 DAY_6 LC_TIME Name of the sixth day of the week (for
38 example, Friday).
39 DAY_7 LC_TIME Name of the seventh day of the week
40 (for example, Saturday).
41 ABDAY_1 LC_TIME Abbreviated name of the first day of the
42 week.
43 ABDAY_2 LC_TIME Abbreviated name of the second day of
44 the week.
45 ABDAY_3 LC_TIME Abbreviated name of the third day of the
46 week.
47 ABDAY_4 LC_TIME Abbreviated name of the fourth day of
48 the week.
49 ABDAY_5 LC_TIME Abbreviated name of the fifth day of the
50 week.
51 ABDAY_6 LC_TIME Abbreviated name of the sixth day of the
52 week.
53 ABDAY_7 LC_TIME Abbreviated name of the seventh day of
54 the week.
55 MON_1 LC_TIME Name of the first month of the year.
56 MON_2 LC_TIME Name of the second month.
57 MON_3 LC_TIME Name of the third month.
58 MON_4 LC_TIME Name of the fourth month.
59 MON_5 LC_TIME Name of the fifth month.
60 MON_6 LC_TIME Name of the sixth month.
61 MON_7 LC_TIME Name of the seventh month.
62 MON_8 LC_TIME Name of the eighth month.
63 MON_9 LC_TIME Name of the ninth month.
64 MON_10 LC_TIME Name of the tenth month.
65 MON_11 LC_TIME Name of the eleventh month.
66
67 MON_12 LC_TIME Name of the twelfth month.
68 ABMON_1 LC_TIME Abbreviated name of the first month.
69 ABMON_2 LC_TIME Abbreviated name of the second month.
70 ABMON_3 LC_TIME Abbreviated name of the third month.
71 ABMON_4 LC_TIME Abbreviated name of the fourth month.
72 ABMON_5 LC_TIME Abbreviated name of the fifth month.
73 ABMON_6 LC_TIME Abbreviated name of the sixth month.
74 ABMON_7 LC_TIME Abbreviated name of the seventh month.
75 ABMON_8 LC_TIME Abbreviated name of the eighth month.
76 ABMON_9 LC_TIME Abbreviated name of the ninth month.
77 ABMON_10 LC_TIME Abbreviated name of the tenth month.
78 ABMON_11 LC_TIME Abbreviated name of the eleventh month.
79 ABMON_12 LC_TIME Abbreviated name of the twelfth month.
80 ERA LC_TIME Era description segments.
81 ERA_D_FMT LC_TIME Era date format string.
82 ERA_D_T_FMT LC_TIME Era date and time format string.
83 ERA_T_FMT LC_TIME Era time format string.
84 ALT_DIGITS LC_TIME Alternative symbols for digits.
85 RADIXCHAR LC_NUMERIC Radix character.
86 THOUSEP LC_NUMERIC Separator for thousands.
87 YESEXPR LC_MESSAGES Affirmative response expression.
88 NOEXPR LC_MESSAGES Negative response expression.
89 CRNCYSTR LC_MONETARY Local currency symbol, preceded by '-'
90 if the symbol should appear before the
91 value, '+' if the symbol should appear
92 after the value, or '.' if the symbol
93 should replace the radix character. If
94 the local currency symbol is the empty
95 string, implementations may return the
96 empty string ( "" ).
97
98 If the locale's values for p_cs_precedes and n_cs_precedes do not
99 match, the value of nl_langinfo(CRNCYSTR) is unspecified.
100
101 The following shall be declared as a function and may also be defined
102 as a macro. A function prototype shall be provided.
103
104
105 char *nl_langinfo(nl_item);
106
107 Inclusion of the <langinfo.h> header may also make visible all symbols
108 from <nl_types.h>.
109
110 The following sections are informative.
111
113 Wherever possible, users are advised to use functions compatible with
114 those in the ISO C standard to access items of langinfo data. In par‐
115 ticular, the strftime() function should be used to access date and time
116 information defined in category LC_TIME . The localeconv() function
117 should be used to access information corresponding to RADIXCHAR,
118 THOUSEP, and CRNCYSTR.
119
121 None.
122
124 None.
125
127 The System Interfaces volume of IEEE Std 1003.1-2001, nl_langinfo(),
128 localeconv(), strfmon(), strftime(), Locale
129
131 Portions of this text are reprinted and reproduced in electronic form
132 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
133 -- Portable Operating System Interface (POSIX), The Open Group Base
134 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
135 Electrical and Electronics Engineers, Inc and The Open Group. In the
136 event of any discrepancy between this version and the original IEEE and
137 The Open Group Standard, the original IEEE and The Open Group Standard
138 is the referee document. The original Standard can be obtained online
139 at http://www.opengroup.org/unix/online.html .
140
141
142
143IEEE/The Open Group 2003 <langinfo.h>(P)