Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > L

langinfo(5)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

langinfo — language information constants

SYNOPSIS

#include <langinfo.h>

DESCRIPTION

This header file contains the constants used to identify items of langinfo data (see nl_langinfo(3C)). The mode of items is given in <nl_types.h>. The following constants are defined. (Category indicates in which setlocale() category each item is defined).

ConstantCategoryDescription
CODESETLC_CTYPECodeset name, such as iso88591 and eucJP.
D_T_FMTLC_TIMEString for formatting the %c (date and time) directive of date, getdate(), and strftime().
D_FMTLC_TIMEString for formatting the %x (date) directive of date, getdate(), and strftime().
T_FMTLC_TIMEString for formatting the %X (time) directive of date, getdate(), and strftime().
T_FMT_AMPMLC_TIMETime representation in the 12 hour clock format with AM_STR and PM_STR.
AM_STRLC_TIMEAnte meridiem string used with 12 hour time formats (AM in English).
PM_STRLC_TIMEPost meridiem string used with 12 hour time formats (PM in English).
DAY_1 LC_TIMEName of the first day of the week (Sunday in English).
... ......
DAY_7 LC_TIMEName of the seventh day of the week.
ABDAY_1LC_TIMEAbbreviated name of the first day of the week (Sun in English).
... ......
ABDAY_7LC_TIMEAbbreviated name of the seventh day of the week.
MON_1LC_TIMEName of the first month in the Gregorian year.
... ......
MON_12LC_TIMEName of the twelfth month.
ABMON_1LC_TIMEAbbreviated name of the first month.
... ......
ABMON_12LC_TIMEAbbreviated name of the twelfth month.
ERALC_TIMEThe era description segments, which describe how years are counted and displayed for each era in a locale. Each era description segment has the format:
direction:offset:start_date: end_date:era_name:era_format
according to the descriptions below. There will be as many era description segments as are necessary to describe the different eras. Era description segments are separated by semicolons.
Note that the start of an era might not be the earliest point in the era; it might be the latest. For example, the Christian era BC starts on the day before January 1, AD 1, and increases with earlier time.
direction: Either a + or a - character. The + character indicates that years closer to the start_date have lower numbers than those closer to the end_date.
offset: The number of the year closest to the start_date in the era.
start_date: A date in the format yyyy/mm/dd, where yyyy, mm, dd are the year, month, and day numbers respectively of the start of the era. Years prior to AD 1 are represented as negative numbers.
end_date: The ending date of the era, in the same format as the start_date or one of the two special values -* or +*. The value -* indicates that the ending date is the beginning of time. The value +* indicates that the ending date is the end of time.
era_name: The era, corresponding to the %EC conversion specification.
era_format: The format of the year in the era, corresponding to the %EY conversion specification.
ERA_D_FMTLC_TIMEFormat string for formatting the %E (Emperor/Era name and year) directive of date and strftime() if an individual era format is not specified for an era (see localedef(1M)).
ERA_D_T_FMTLC_TIMEThe locale's appropriate alternative date and time format, corresponding to the %Ec field descriptor.
ERA_T_FMTLC_TIMEThe locale's appropriate alternative date and time format, corresponding to the %EX field descriptor.
ALT_DIGITSLC_NUMERICThe alternative symbols for digits, corresponding to the %O conversion specification modifier. The value consists of semicolon separated strings. The first string is the alternative symbol corresponding with zero, the second string corresponding with one, etc. Up to 100 alternate symbol strings may be specified.
RADIXCHARLC_NUMERICRadix character ("decimal point" in English). The string returned is the same as the decimal_point element in the structure returned by localeconv().
THOUSEPLC_NUMERICSeparator for thousands. The string returned is the same as the thousands_sep element in the structure returned by localeconv().
YESEXPRLC_MESSAGESAffirmative response extended regular expression.
NOEXPRLC_MESSAGESNegative response extended regular expression.
YESSTRLC_MESSAGESAffirmative response for yes/no questions. (Obsolete: use YESEXPR.)
NOSTRLC_MESSAGESNegative response for yes/no questions. (Obsolete: use NOEXPR.)
CRNCYSTRLC_MONETARYSymbol for currency preceded by - if it precedes the number, + if it follows the number, and . if it replaces the radix. For example, -DM would be used for de_DE.iso88591 (DM1234,56), + Kr for da_DK.iso88591 (1234,56 Kr), and .$ for pt_PT.iso88591 (1234$56). See localeconv(3C) for alternative currency formatting information.
DIRECTIONLC_CTYPEValue to indicate text direction. Values currently defined include null, 0, and 1. Values of null or 0 indicate that characters are arranged from left to right within a line and lines are arranged from top to bottom. A value of 1 indicates that characters are arranged from right to left within a line and lines are arranged from top to bottom. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
CONTEXTLC_CTYPEString indicating character context analysis. String null or 0 indicates no context analysis is required. String 1 indicates Arabic context analysis required.
ALT_DIGITLC_NUMERICA string of the characters that are mapped into the ASCII equivalent string 0123456789b+-.,eE (where b is a blank). This is also the reverse mapping for output. It is not assumed that the character code values of digits are contiguous or that they are one byte values. A null value for the string indicates that the language has no alternative digits. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
ALT_PUNCTLC_CTYPEA string of the characters that are mapped into the ASCII equivalent string b!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ (where b is a blank) in American usage. This is also the reverse mapping for output. It is not assumed that the character code values of punctuation characters are contiguous or that they are one byte values. If any punctuation characters do not have equivalent alternatives, ASCII codes are used in the alternative punctuation string. A null value for the string indicates that the language has no alternative punctuation characters. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
YEAR_UNITLC_TIMESymbol for year. This is usually required to specify date for Asian languages. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
MON_UNITLC_TIMESymbol for month. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
DAY_UNITLC_TIMESymbol for day. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
HOUR_UNITLC_TIMESymbol for hour. This is usually required to specify time for Asian languages. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
MIN_UNITLC_TIMESymbol for minute. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
SEC_UNITLC_TIMESymbol for second. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)
CHARMAPLC_COLLATE LC_CTYPE The name of the charmap used to compile this locale. (This constant is an HP proprietary item, subject to change, and may not be portable to other platforms.)

WARNINGS

It is recommended that you use strftime() to access date and time information defined in category (see strftime(3C)), LC_TIME and localeconv() to access information corresponding to RADIXCHAR, THOUSEP, and CRNCYSTR (see localeconv(3C)).

AUTHOR

langinfo was developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.