1langinfo.h(0P) POSIX Programmer's Manual langinfo.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 langinfo.h — language information constants
13
15 #include <langinfo.h>
16
18 The <langinfo.h> header shall define the symbolic constants used to
19 identify items of langinfo data (see nl_langinfo()).
20
21 The <langinfo.h> header shall define the locale_t type as described in
22 <locale.h>.
23
24 The <langinfo.h> header shall define the nl_item type as described in
25 <nl_types.h>.
26
27 The <langinfo.h> header shall define the following symbolic constants
28 with type nl_item. The entries under Category indicate in which setlo‐
29 cale() category each item is defined.
30
31 ┌───────────┬───────────┬───────────────────────────────────────────────────────────┐
32 │ Constant │ Category │ Meaning │
33 ├───────────┼───────────┼───────────────────────────────────────────────────────────┤
34 │CODESET │LC_CTYPE │Codeset name. │
35 │D_T_FMT │LC_TIME │String for formatting date and time. │
36 │D_FMT │LC_TIME │Date format string. │
37 │T_FMT │LC_TIME │Time format string. │
38 │T_FMT_AMPM │LC_TIME │a.m. or p.m. time format string. │
39 │AM_STR │LC_TIME │Ante-meridiem affix. │
40 │PM_STR │LC_TIME │Post-meridiem affix. │
41 │DAY_1 │LC_TIME │Name of the first day of the week (for example, Sunday). │
42 │DAY_2 │LC_TIME │Name of the second day of the week (for example, Monday). │
43 │DAY_3 │LC_TIME │Name of the third day of the week (for example, Tuesday). │
44 │DAY_4 │LC_TIME │Name of the fourth day of the week │
45 │ │ │(for example, Wednesday). │
46 │DAY_5 │LC_TIME │Name of the fifth day of the week (for example, Thursday). │
47 │DAY_6 │LC_TIME │Name of the sixth day of the week (for example, Friday). │
48 │DAY_7 │LC_TIME │Name of the seventh day of the week │
49 │ │ │(for example, Saturday). │
50 │ABDAY_1 │LC_TIME │Abbreviated name of the first day of the week. │
51 │ABDAY_2 │LC_TIME │Abbreviated name of the second day of the week. │
52 │ABDAY_3 │LC_TIME │Abbreviated name of the third day of the week. │
53 │ABDAY_4 │LC_TIME │Abbreviated name of the fourth day of the week. │
54 │ABDAY_5 │LC_TIME │Abbreviated name of the fifth day of the week. │
55 │ABDAY_6 │LC_TIME │Abbreviated name of the sixth day of the week. │
56 │ABDAY_7 │LC_TIME │Abbreviated name of the seventh day of the week. │
57 │MON_1 │LC_TIME │Name of the first month of the year. │
58 │MON_2 │LC_TIME │Name of the second month. │
59 │MON_3 │LC_TIME │Name of the third month. │
60 │MON_4 │LC_TIME │Name of the fourth month. │
61 │MON_5 │LC_TIME │Name of the fifth month. │
62 │MON_6 │LC_TIME │Name of the sixth month. │
63 │MON_7 │LC_TIME │Name of the seventh month. │
64 │MON_8 │LC_TIME │Name of the eighth month. │
65 │MON_9 │LC_TIME │Name of the ninth month. │
66 │MON_10 │LC_TIME │Name of the tenth month. │
67 │MON_11 │LC_TIME │Name of the eleventh month. │
68 │MON_12 │LC_TIME │Name of the twelfth month. │
69 │ABMON_1 │LC_TIME │Abbreviated name of the first month. │
70 │ABMON_2 │LC_TIME │Abbreviated name of the second month. │
71 │ABMON_3 │LC_TIME │Abbreviated name of the third month. │
72 │ABMON_4 │LC_TIME │Abbreviated name of the fourth month. │
73 │ABMON_5 │LC_TIME │Abbreviated name of the fifth month. │
74 │ABMON_6 │LC_TIME │Abbreviated name of the sixth month. │
75 │ABMON_7 │LC_TIME │Abbreviated name of the seventh month. │
76 │ABMON_8 │LC_TIME │Abbreviated name of the eighth month. │
77 │ABMON_9 │LC_TIME │Abbreviated name of the ninth month. │
78 │ABMON_10 │LC_TIME │Abbreviated name of the tenth month. │
79 │ABMON_11 │LC_TIME │Abbreviated name of the eleventh month. │
80 │ABMON_12 │LC_TIME │Abbreviated name of the twelfth month. │
81 │ERA │LC_TIME │Era description segments. │
82 │ERA_D_FMT │LC_TIME │Era date format string. │
83 │ERA_D_T_FMT│LC_TIME │Era date and time format string. │
84 │ERA_T_FMT │LC_TIME │Era time format string. │
85 │ALT_DIGITS │LC_TIME │Alternative symbols for digits. │
86 │RADIXCHAR │LC_NUMERIC │Radix character. │
87 │THOUSEP │LC_NUMERIC │Separator for thousands. │
88 │YESEXPR │LC_MESSAGES│Affirmative response expression. │
89 │NOEXPR │LC_MESSAGES│Negative response expression. │
90 │CRNCYSTR │LC_MONETARY│Local currency symbol, preceded by '-' if the symbol │
91 │ │ │should appear before the value, '+' if the symbol should │
92 │ │ │appear after the value, or '.' if the symbol should │
93 │ │ │replace the radix character. If the local currency symbol │
94 │ │ │is the empty string, implementations may return the empty │
95 │ │ │string (""). │
96 └───────────┴───────────┴───────────────────────────────────────────────────────────┘
97 If the locale's values for p_cs_precedes and n_cs_precedes do not
98 match, the value of nl_langinfo(CRNCYSTR) and nl_langinfo_l(CRN‐
99 CYSTR,loc) 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 char *nl_langinfo_l(nl_item, locale_t);
107
108 Inclusion of the <langinfo.h> header may also make visible all symbols
109 from <nl_types.h>.
110
111 The following sections are informative.
112
114 Wherever possible, users are advised to use functions compatible with
115 those in the ISO C standard to access items of langinfo data. In par‐
116 ticular, the strftime() function should be used to access date and time
117 information defined in category LC_TIME. The localeconv() function
118 should be used to access information corresponding to RADIXCHAR,
119 THOUSEP, and CRNCYSTR.
120
122 None.
123
125 None.
126
128 Chapter 7, Locale, <locale.h>, <nl_types.h>
129
130 The System Interfaces volume of POSIX.1‐2017, nl_langinfo(), locale‐
131 conv(), strfmon(), strftime()
132
134 Portions of this text are reprinted and reproduced in electronic form
135 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
136 table Operating System Interface (POSIX), The Open Group Base Specifi‐
137 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
138 Electrical and Electronics Engineers, Inc and The Open Group. In the
139 event of any discrepancy between this version and the original IEEE and
140 The Open Group Standard, the original IEEE and The Open Group Standard
141 is the referee document. The original Standard can be obtained online
142 at http://www.opengroup.org/unix/online.html .
143
144 Any typographical or formatting errors that appear in this page are
145 most likely to have been introduced during the conversion of the source
146 files to man page format. To report such errors, see https://www.ker‐
147 nel.org/doc/man-pages/reporting_bugs.html .
148
149
150
151IEEE/The Open Group 2017 langinfo.h(0P)