langinfo.h(3)              POSIX Programmer's Manual             langinfo.h(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       langinfo.h -- language information constants

SSYYNNOOPPSSIISS
       #include <langinfo.h>

DDEESSCCRRIIPPTTIIOONN
       The _<_l_a_n_g_i_n_f_o_._h_> header shall define the symbolic constants used to
       identify items of _l_a_n_g_i_n_f_o data (see _n_l___l_a_n_g_i_n_f_o()).

       The _<_l_a_n_g_i_n_f_o_._h_> header shall define the llooccaallee__tt type as described in
       _<_l_o_c_a_l_e_._h_>.

       The _<_l_a_n_g_i_n_f_o_._h_> header shall define the nnll__iitteemm type as described in
       _<_n_l___t_y_p_e_s_._h_>.

       The _<_l_a_n_g_i_n_f_o_._h_> header shall define the following symbolic constants
       with type nnll__iitteemm.  The entries under CCaatteeggoorryy indicate in which
       _s_e_t_l_o_c_a_l_e() category each item is defined.

 +-----------+-----------+-----------------------------------------------------------+
 | CCoonnssttaanntt  | CCaatteeggoorryy  |                         MMeeaanniinngg                           |
 +-----------+-----------+-----------------------------------------------------------+
 |CODESET    |_L_C___C_T_Y_P_E   |Codeset name.                                              |
 |D_T_FMT    |_L_C___T_I_M_E    |String for formatting date and time.                       |
 |D_FMT      |_L_C___T_I_M_E    |Date format string.                                        |
 |T_FMT      |_L_C___T_I_M_E    |Time format string.                                        |
 |T_FMT_AMPM |_L_C___T_I_M_E    |a.m. or p.m. time format string.                           |
 |AM_STR     |_L_C___T_I_M_E    |Ante-meridiem affix.                                       |
 |PM_STR     |_L_C___T_I_M_E    |Post-meridiem affix.                                       |
 |DAY_1      |_L_C___T_I_M_E    |Name of the first day of the week (for example, Sunday).   |
 |DAY_2      |_L_C___T_I_M_E    |Name of the second day of the week (for example, Monday).  |
 |DAY_3      |_L_C___T_I_M_E    |Name of the third day of the week (for example, Tuesday).  |
 |DAY_4      |_L_C___T_I_M_E    |Name of the fourth day of the week                         |
 |           |           |(for example, Wednesday).                                  |
 |DAY_5      |_L_C___T_I_M_E    |Name of the fifth day of the week (for example, Thursday). |
 |DAY_6      |_L_C___T_I_M_E    |Name of the sixth day of the week (for example, Friday).   |
 |DAY_7      |_L_C___T_I_M_E    |Name of the seventh day of the week                        |
 |           |           |(for example, Saturday).                                   |
 |ABDAY_1    |_L_C___T_I_M_E    |Abbreviated name of the first day of the week.             |
 |ABDAY_2    |_L_C___T_I_M_E    |Abbreviated name of the second day of the week.            |
 |ABDAY_3    |_L_C___T_I_M_E    |Abbreviated name of the third day of the week.             |
 |ABDAY_4    |_L_C___T_I_M_E    |Abbreviated name of the fourth day of the week.            |
 |ABDAY_5    |_L_C___T_I_M_E    |Abbreviated name of the fifth day of the week.             |
 |ABDAY_6    |_L_C___T_I_M_E    |Abbreviated name of the sixth day of the week.             |
 |ABDAY_7    |_L_C___T_I_M_E    |Abbreviated name of the seventh day of the week.           |
 |MON_1      |_L_C___T_I_M_E    |Name of the first month of the year.                       |
 |MON_2      |_L_C___T_I_M_E    |Name of the second month.                                  |
 |MON_3      |_L_C___T_I_M_E    |Name of the third month.                                   |
 |MON_4      |_L_C___T_I_M_E    |Name of the fourth month.                                  |
 |MON_5      |_L_C___T_I_M_E    |Name of the fifth month.                                   |
 |MON_6      |_L_C___T_I_M_E    |Name of the sixth month.                                   |
 |MON_7      |_L_C___T_I_M_E    |Name of the seventh month.                                 |
 |MON_8      |_L_C___T_I_M_E    |Name of the eighth month.                                  |
 |MON_9      |_L_C___T_I_M_E    |Name of the ninth month.                                   |
 |MON_10     |_L_C___T_I_M_E    |Name of the tenth month.                                   |
 |MON_11     |_L_C___T_I_M_E    |Name of the eleventh month.                                |
 |MON_12     |_L_C___T_I_M_E    |Name of the twelfth month.                                 |
 |ABMON_1    |_L_C___T_I_M_E    |Abbreviated name of the first month.                       |
 |ABMON_2    |_L_C___T_I_M_E    |Abbreviated name of the second month.                      |
 |ABMON_3    |_L_C___T_I_M_E    |Abbreviated name of the third month.                       |
 |ABMON_4    |_L_C___T_I_M_E    |Abbreviated name of the fourth month.                      |
 |ABMON_5    |_L_C___T_I_M_E    |Abbreviated name of the fifth month.                       |
 |ABMON_6    |_L_C___T_I_M_E    |Abbreviated name of the sixth month.                       |
 |ABMON_7    |_L_C___T_I_M_E    |Abbreviated name of the seventh month.                     |
 |ABMON_8    |_L_C___T_I_M_E    |Abbreviated name of the eighth month.                      |
 |ABMON_9    |_L_C___T_I_M_E    |Abbreviated name of the ninth month.                       |
 |ABMON_10   |_L_C___T_I_M_E    |Abbreviated name of the tenth month.                       |
 |ABMON_11   |_L_C___T_I_M_E    |Abbreviated name of the eleventh month.                    |
 |ABMON_12   |_L_C___T_I_M_E    |Abbreviated name of the twelfth month.                     |
 |ERA        |_L_C___T_I_M_E    |Era description segments.                                  |
 |ERA_D_FMT  |_L_C___T_I_M_E    |Era date format string.                                    |
 |ERA_D_T_FMT|_L_C___T_I_M_E    |Era date and time format string.                           |
 |ERA_T_FMT  |_L_C___T_I_M_E    |Era time format string.                                    |
 |ALT_DIGITS |_L_C___T_I_M_E    |Alternative symbols for digits.                            |
 |RADIXCHAR  |_L_C___N_U_M_E_R_I_C |Radix character.                                           |
 |THOUSEP    |_L_C___N_U_M_E_R_I_C |Separator for thousands.                                   |
 |YESEXPR    |_L_C___M_E_S_S_A_G_E_S|Affirmative response expression.                           |
 |NOEXPR     |_L_C___M_E_S_S_A_G_E_S|Negative response expression.                              |
 |CRNCYSTR   |_L_C___M_O_N_E_T_A_R_Y|Local currency symbol, preceded by ''--'' if the symbol       |
 |           |           |should appear before the value, ''++'' if the symbol should   |
 |           |           |appear after the value, or ''..''  if the symbol should       |
 |           |           |replace the radix character. If the local currency symbol  |
 |           |           |is the empty string, implementations may return the empty  |
 |           |           |string ("""").                                               |
 +-----------+-----------+-----------------------------------------------------------+
       If the locale's values for pp__ccss__pprreecceeddeess and nn__ccss__pprreecceeddeess do not
       match, the value of _n_l___l_a_n_g_i_n_f_o(CRNCYSTR) and
       _n_l___l_a_n_g_i_n_f_o___l(CRNCYSTR,loc) is unspecified.

       The following shall be declared as a function and may also be defined
       as a macro. A function prototype shall be provided.

           cchhaarr **nnll__llaannggiinnffoo((nnll__iitteemm));;
           cchhaarr **nnll__llaannggiinnffoo__ll((nnll__iitteemm,, llooccaallee__tt));;

       Inclusion of the _<_l_a_n_g_i_n_f_o_._h_> header may also make visible all symbols
       from _<_n_l___t_y_p_e_s_._h_>.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       Wherever possible, users are advised to use functions compatible with
       those in the ISO C standard to access items of _l_a_n_g_i_n_f_o data. In
       particular, the _s_t_r_f_t_i_m_e() function should be used to access date and
       time information defined in category _L_C___T_I_M_E.  The _l_o_c_a_l_e_c_o_n_v()
       function should be used to access information corresponding to
       RADIXCHAR, THOUSEP, and CRNCYSTR.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _C_h_a_p_t_e_r _7, _L_o_c_a_l_e, <<llooccaallee..hh>>, <<nnll__ttyyppeess..hh>>

       The System Interfaces volume of POSIX.1-2008, _n_l___l_a_n_g_i_n_f_o(),
       _l_o_c_a_l_e_c_o_n_v(), _s_t_r_f_m_o_n(), _s_t_r_f_t_i_m_e()

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                        langinfo.h(3)
