1langinfo.h(0P)             POSIX Programmer's Manual            langinfo.h(0P)
2
3
4

PROLOG

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
11

NAME

13       langinfo.h — language information constants
14

SYNOPSIS

16       #include <langinfo.h>
17

DESCRIPTION

19       The <langinfo.h> header shall define the  symbolic  constants  used  to
20       identify items of langinfo data (see nl_langinfo()).
21
22       The  <langinfo.h> header shall define the locale_t type as described in
23       <locale.h>.
24
25       The <langinfo.h> header shall define the nl_item type as  described  in
26       <nl_types.h>.
27
28       The  <langinfo.h>  header shall define the following symbolic constants
29       with type nl_item.  The entries under Category indicate in which setlo‐
30       cale() category each item is defined.
31
32 ┌───────────┬───────────┬───────────────────────────────────────────────────────────┐
33Constant  Category  Meaning                           
34 ├───────────┼───────────┼───────────────────────────────────────────────────────────┤
35 │CODESET    │LC_CTYPE   │Codeset name.                                              │
36 │D_T_FMT    │LC_TIME    │String for formatting date and time.                       │
37 │D_FMT      │LC_TIME    │Date format string.                                        │
38 │T_FMT      │LC_TIME    │Time format string.                                        │
39 │T_FMT_AMPM │LC_TIME    │a.m. or p.m. time format string.                           │
40 │AM_STR     │LC_TIME    │Ante-meridiem affix.                                       │
41 │PM_STR     │LC_TIME    │Post-meridiem affix.                                       │
42 │DAY_1      │LC_TIME    │Name of the first day of the week (for example, Sunday).   │
43 │DAY_2      │LC_TIME    │Name of the second day of the week (for example, Monday).  │
44 │DAY_3      │LC_TIME    │Name of the third day of the week (for example, Tuesday).  │
45 │DAY_4      │LC_TIME    │Name of the fourth day of the week                         │
46 │           │           │(for example, Wednesday).                                  │
47 │DAY_5      │LC_TIME    │Name of the fifth day of the week (for example, Thursday). │
48 │DAY_6      │LC_TIME    │Name of the sixth day of the week (for example, Friday).   │
49 │DAY_7      │LC_TIME    │Name of the seventh day of the week                        │
50 │           │           │(for example, Saturday).                                   │
51 │ABDAY_1    │LC_TIME    │Abbreviated name of the first day of the week.             │
52 │ABDAY_2    │LC_TIME    │Abbreviated name of the second day of the week.            │
53 │ABDAY_3    │LC_TIME    │Abbreviated name of the third day of the week.             │
54 │ABDAY_4    │LC_TIME    │Abbreviated name of the fourth day of the week.            │
55 │ABDAY_5    │LC_TIME    │Abbreviated name of the fifth day of the week.             │
56 │ABDAY_6    │LC_TIME    │Abbreviated name of the sixth day of the week.             │
57 │ABDAY_7    │LC_TIME    │Abbreviated name of the seventh day of the week.           │
58 │MON_1      │LC_TIME    │Name of the first month of the year.                       │
59 │MON_2      │LC_TIME    │Name of the second month.                                  │
60 │MON_3      │LC_TIME    │Name of the third month.                                   │
61 │MON_4      │LC_TIME    │Name of the fourth month.                                  │
62 │MON_5      │LC_TIME    │Name of the fifth month.                                   │
63 │MON_6      │LC_TIME    │Name of the sixth month.                                   │
64 │MON_7      │LC_TIME    │Name of the seventh month.                                 │
65 │MON_8      │LC_TIME    │Name of the eighth month.                                  │
66 │MON_9      │LC_TIME    │Name of the ninth month.                                   │
67 │MON_10     │LC_TIME    │Name of the tenth month.                                   │
68 │MON_11     │LC_TIME    │Name of the eleventh month.                                │
69 │MON_12     │LC_TIME    │Name of the twelfth month.                                 │
70 │ABMON_1    │LC_TIME    │Abbreviated name of the first month.                       │
71 │ABMON_2    │LC_TIME    │Abbreviated name of the second month.                      │
72 │ABMON_3    │LC_TIME    │Abbreviated name of the third month.                       │
73 │ABMON_4    │LC_TIME    │Abbreviated name of the fourth month.                      │
74 │ABMON_5    │LC_TIME    │Abbreviated name of the fifth month.                       │
75 │ABMON_6    │LC_TIME    │Abbreviated name of the sixth month.                       │
76 │ABMON_7    │LC_TIME    │Abbreviated name of the seventh month.                     │
77 │ABMON_8    │LC_TIME    │Abbreviated name of the eighth month.                      │
78 │ABMON_9    │LC_TIME    │Abbreviated name of the ninth month.                       │
79 │ABMON_10   │LC_TIME    │Abbreviated name of the tenth month.                       │
80 │ABMON_11   │LC_TIME    │Abbreviated name of the eleventh month.                    │
81 │ABMON_12   │LC_TIME    │Abbreviated name of the twelfth month.                     │
82 │ERA        │LC_TIME    │Era description segments.                                  │
83 │ERA_D_FMT  │LC_TIME    │Era date format string.                                    │
84 │ERA_D_T_FMT│LC_TIME    │Era date and time format string.                           │
85 │ERA_T_FMT  │LC_TIME    │Era time format string.                                    │
86 │ALT_DIGITS │LC_TIME    │Alternative symbols for digits.                            │
87 │RADIXCHAR  │LC_NUMERIC │Radix character.                                           │
88 │THOUSEP    │LC_NUMERIC │Separator for thousands.                                   │
89 │YESEXPR    │LC_MESSAGES│Affirmative response expression.                           │
90 │NOEXPR     │LC_MESSAGES│Negative response expression.                              │
91 │CRNCYSTR   │LC_MONETARY│Local  currency  symbol,  preceded  by  '−'  if the symbol │
92 │           │           │should appear before the value, '+' if the  symbol  should │
93 │           │           │appear  after  the  value,  or  '.'   if the symbol should │
94 │           │           │replace the radix character. If the local currency  symbol │
95 │           │           │is  the empty string, implementations may return the empty │
96 │           │           │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)  and  nl_langinfo_l(CRN‐
100       CYSTR,loc) is unspecified.
101
102       The following shall be declared as a function and may also  be  defined
103       as a macro. A function prototype shall be provided.
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

APPLICATION USAGE

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

RATIONALE

122       None.
123

FUTURE DIRECTIONS

125       None.
126

SEE ALSO

128       Chapter 7, Locale, <locale.h>, <nl_types.h>
129
130       The  System  Interfaces  volume of POSIX.1‐2008, 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, 2013 Edition, Standard for Information Technology
136       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
137       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
138       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
139       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
140       event of any discrepancy between this version and the original IEEE and
141       The  Open Group Standard, the original IEEE and The Open Group Standard
142       is the referee document. The original Standard can be  obtained  online
143       at http://www.unix.org/online.html .
144
145       Any  typographical  or  formatting  errors that appear in this page are
146       most likely to have been introduced during the conversion of the source
147       files  to  man page format. To report such errors, see https://www.ker
148       nel.org/doc/man-pages/reporting_bugs.html .
149
150
151
152IEEE/The Open Group                  2013                       langinfo.h(0P)
Impressum