langinfo.h, langinfo - language information constants
#include <langinfo.h>
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.
| Constant | Category | Meaning |
| CODESET | LC_CTYPE | codeset name |
| D_T_FMT | ||
| D_FMT | ||
| T_FMT | ||
| T_FMT_AMPM | ||
| AM_STR | ||
| PM_STR | ||
| DAY_1 | ||
| DAY_2 | ||
| DAY_3 | ||
| DAY_4 | ||
| DAY_5 | ||
| DAY_6 | ||
| DAY_7 | ||
| ABDAY_1 | ||
| ABDAY_2 | ||
| ABDAY_3 | ||
| ABDAY_4 | ||
| ABDAY_5 | ||
| ABDAY_6 | ||
| ABDAY_7 | ||
| MON_1 | ||
| MON_2 | ||
| MON_3 | ||
| MON_4 | ||
| MON_5 | ||
| MON_6 | ||
| MON_7 | ||
| MON_8 | ||
| MON_9 | ||
| MON_10 | ||
| MON_11 | ||
| MON_12 | ||
| ABMON_1 | ||
| ABMON_2 | ||
| ABMON_3 | ||
| ABMON_4 | ||
| ABMON_5 | ||
| ABMON_6 | ||
| ABMON_7 | ||
| ABMON_8 | ||
| ABMON_9 | ||
| ABMON_10 | ||
| ABMON_11 | ||
| ABMON_12 | ||
| ERA | ||
| ERA_D_FMT | ||
| ERA_D_T_FMT | ||
| ERA_T_FMT | ||
| ALT_DIGITS | ||
| RADIXCHAR | ||
| THOUSEP | ||
| YESEXPR | ||
| NOEXPR | ||
| YESSTR | ||
| NOSTR | ||
| CRNCYSTR | ||
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>.
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 attributes(5) for descriptions of the following attributes:
| ||||||
mkmsgs(1), localeconv(3C), nl_langinfo(3C), nl_types.h(3HEAD), setlocale(3C), strftime(3C), attributes(5), standards(5)
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |