Document revision date: 19 July 1999 | |
Previous | Contents | Index |
The LC_MESSAGES category defines the format for affirmative and negative system responses. This category begins with the LC_MESSAGES header and ends with the END LC_MESSAGES trailer.
All operands for the LC_MESSAGES category are defined as strings or extended regular expressions bounded by double quotation marks ("). These operands are separated from the keyword they define by one or more blank characters (spaces or tabs). Two adjacent double quotation marks ("") indicate an undefined value.
Table 2-3 lists the statement keywords recognized in the LC_MESSAGES category.
Keyword | Description |
---|---|
copy |
Specifies the name of an existing locale to be used as the definition
of this category.
If you specify a copy statement, you cannot specify any other keyword. |
yesexpr | Specifies an extended regular expression that describes the acceptable affirmative response to a question expecting an affirmative or negative response. |
noexpr | Specifies an extended regular expression that describes the acceptable negative response to a question expecting an affirmative or negative response. |
yesstr |
Specifies the locale's equivalent of an acceptable affirmative response.
This string is accessible to applications through the nl_langinfo subroutine as nl_langinfo (YESSTR). Note that yesstr is likely to be withdrawn from the XPG4 standard; yesexpr is the recommended alternative. |
nostr |
Specifies the locale's equivalent of an acceptable negative response.
This string is accessible to applications through the nl_langinfo subroutine as nl_langinfo (NOSTR). Note that nostr is likely to be withdrawn from the XPG4 standard; noexpr is the recommended alternative. |
The following is a sample LC_MESSAGES category specified in a locale definition source file:
LC_MESSAGES # yesexpr "<circumflex><left-square-bracket><y><Y>\ <right-square-bracket>" noexpr "<circumflex><left-square-bracket><n><N>\ <right-square-bracket>" yesstr "<y><e><s>" nostr "<n><o>" # END LC_MESSAGES |
The LC_MONETARY category defines rules and symbols for formatting
monetary numeric information. This category begins with the LC_MONETARY
header and ends with the END LC_MONETARY trailer.
2.5.1 LC_MONETARY Keywords
All operands for the LC_MONETARY category keywords are defined as string or integer values. String values are bounded by double quotation marks ("). All values are separated from the keyword they define by one or more blank characters (spaces or tabs). Two adjacent double quotation marks ("") indicate an undefined string value. A negative one (--1) indicates an undefined integer value.
Table 2-4 lists the statement keywords recognized in the LC_MONETARY category.
Keyword | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
copy |
Specifies the name of an existing locale to be used as the definition
of this category.
If you specify a copy statement, you cannot specify any other keyword. |
||||||||||
int_curr_symbol |
Specifies the string used for the international currency symbol.
The operand for this keyword is a 4-character string+. The first three characters contain the alphabetic international currency symbol. The fourth character defines a character separator for insertion between the international currency symbol and a monetary quantity. |
||||||||||
currency_symbol | Specifies the string used for the local currency symbol. | ||||||||||
mon_decimal_point | Specifies the decimal delimiter string used for formatting monetary quantities. | ||||||||||
mon_thousands_sep | Specifies the character separator used for grouping digits to the left of the decimal delimiter in formatted monetary quantities. | ||||||||||
mon_grouping |
Specifies a string that defines the size of each group of digits in
formatted monetary quantities.
The operand for this keyword consists of a sequence of integers separated by semicolons. Each integer specifies the number of digits in a group. The first integer defines the size of the group immediately to the left of the decimal delimiter. Subsequent integers define succeeding groups to the left of the previous group. If the last integer is not --1, it is used to group any remaining digits. If the last integer is --1, no further grouping is performed. A sample interpretation of the mon_grouping statement follows. Assuming a value of 123456789 to be formatted and a mon_thousands_sep operand of ' (single quotation mark), the following results occur:
|
||||||||||
positive_sign | Specifies the string used to indicate a nonnegative-formatted monetary quantity. | ||||||||||
negative_sign | Specifies the string used to indicate a negative-formatted monetary quantity. | ||||||||||
int_frac_digits | Specifies an integer value representing the number of fractional digits (those after the decimal delimiter) to be displayed in a formatted monetary quantity using the int_curr_symbol value. | ||||||||||
frac_digits | Specifies an integer value representing the number of fractional digits (those after the decimal delimiter) to be displayed in a formatted monetary quantity using the currency_symbol value. | ||||||||||
p_cs_precedes |
Specifies an integer value indicating whether the
int_curr_symbol or
currency_symbol string precedes or follows the value for a
nonnegative-formatted monetary quantity.
The following integer values are recognized:
|
||||||||||
p_sep_by_space |
Specifies an integer value indicating whether the
int_curr_symbol or
currency_symbol string is separated by a space from a
nonnegative-formatted monetary quantity.
The following integer values are recognized:
|
||||||||||
n_cs_precedes |
Specifies an integer value indicating whether the
int_curr_symbol or
currency_symbol string precedes or follows the value for a
negative-formatted monetary quantity.
The following integer values are recognized:
|
||||||||||
n_sep_by_space |
Specifies an integer value indicating whether the
int_curr_symbol or
currency_symbol string is separated by a space from a
negative-formatted monetary quantity.
The following integer values are recognized:
|
||||||||||
p_sign_posn |
Specifies an integer value indicating the positioning of the
positive_sign string for a nonnegative-formatted monetary
quantity.
The following integer values are recognized:
|
||||||||||
n_sign_posn |
Specifies an integer value indicating the positioning of the
negative_sign string for a negative-formatted monetary
quantity.
The following integer values are recognized:
|
You can produce a unique customized monetary format by changing the value of a single statement. Table 2-5 shows the results of using all combinations of defined values for the p_cs_precedes, p_sep_by_space, and p_sign_posn statements.
p_sep_by_space = | 2 | 1 | 0 | |
---|---|---|---|---|
p_cs_precedes = 1 | p_sign_posn = 0 | ($1.25) | ($ 1.25) | ($1.25) |
p_sign_posn = 1 | + $1.25 | +$ 1.25 | +$1.25 | |
p_sign_posn = 2 | $1.25 + | $ 1.25+ | $1.25+ | |
p_sign_posn = 3 | + $1.25 | +$ 1.25 | +$1.25 | |
p_sign_posn = 4 | $ +1.25 | $+ 1.25 | $+1.25 | |
p_cs_precedes = 0 | p_sign_posn = 0 | (1.25 $) | (1.25 $) | (1.25$) |
p_sign_posn = 1 | +1.25 $ | +1.25 $ | +1.25$ | |
p_sign_posn = 2 | 1.25$ + | 1.25 $+ | 1.25$+ | |
p_sign_posn = 3 | 1.25+ $ | 1.25 +$ | 1.25+$ | |
p_sign_posn = 4 | 1.25$ + | 1.25 $+ | 1.25$+ |
The following is a sample LC_MONETARY category specified in a locale definition source file:
LC_MONETARY # int_curr_symbol "<U><S><D><space>" currency_symbol "<dollar-sign>" mon_decimal_point "<period>" mon_thousands_sep "<comma>" mon_grouping 3 positive_sign "<plus-sign>" negative_sign "<hyphen>" int_frac_digits 2 frac_digits 2 p_cs_precedes 1 p_sep_by_space 2 n_cs_precedes 1 n_sep_by_space 2 p_sign_posn 3 n_sign_posn 3 # END LC_MONETARY |
The LC_NUMERIC category defines rules and symbols for formatting nonmonetary numeric information. This category begins with the LC_NUMERIC and ends with the END LC_NUMERIC trailer.
All operands for the LC_NUMERIC category keywords are defined as string or integer values. String values are bounded by double quotation marks ("). All values are separated from the keyword they define by one or more blank characters (spaces or tabs). Two adjacent double quotation characters ("") indicate an undefined string value. A negative one (--1) indicates an undefined integer value.
Table 2-6 lists the statement keywords recognized in the LC_NUMERIC category.
Keyword | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
copy |
Specifies the name of an existing locale to be used as the definition
of this category.
If you specify a copy statement, you cannot specify any other keyword. |
||||||||||
decimal_point |
Specifies the decimal delimiter string used to format nonmonetary
numeric quantities.
This keyword cannot be omitted and cannot be set to the undefined string value. |
||||||||||
thousands_sep | Specifies the string separator used for grouping digits to the left of the decimal delimiter in formatted nonmonetary numeric quantities. | ||||||||||
grouping |
Defines the size of each group of digits in formatted monetary
quantities.
The operand for the grouping keyword consists of a sequence of integers separated by semicolons. Each integer specifies the number of digits in a group. The first integer defines the size of the group immediately to the left of the decimal delimiter. Subsequent integers define succeeding groups to the left of the previous group. Grouping is performed for each integer specified for the grouping keyword. If the last integer is not --1, it is used repeatedly to group any remaining digits. If the last integer is --1, no more grouping is performed. A sample interpretation of the grouping statement follows. Assuming a value of 123456789 to be formatted and a thousands_sep operand of ' (single quotation mark), the following results occur:
|
The following is a sample LC_NUMERIC category specified in a locale definition source file:
LC_NUMERIC # decimal_point "<period>" thousands_sep "<comma>" grouping <3> # END LC_NUMERIC |
The LC_TIME category defines rules and symbols for formatting time and date information. This category begins with the LC_TIME category header and ends with the END LC_TIME trailer.
All operands for the LC_TIME category keywords are defined as string or
integer values. String values are bounded by double quotation marks
("). All values are separated from the keyword they define by one or
more blank characters (spaces or tabs). Two adjacent double quotation
characters ("") indicate an undefined string value. Field descriptors,
described later in this section, are used by commands and subroutines
that query the LC_TIME category to represent elements of time and date
formats.
2.7.1 Keywords
Table 2-7 lists the statement keywords recognized in the LC_TIME category.
Keyword | Description |
---|---|
copy |
Specifies the name of an existing locale to be used as the definition
of this category.
If you specify a copy statement, you cannot specify any other keyword. |
abday |
Defines the abbreviated weekday names corresponding to the %a field
descriptor.
Recognized values consist of seven strings separated by semicolons. The first string corresponds to the abbreviated name for the first day of the week (Sun), the second to the abbreviated name for the second day of the week, and so on. |
day |
Defines the full spelling of the weekday names corresponding to the %A
field descriptor.
Recognized values consist of seven strings separated by semicolons. The first string corresponds to the full spelling of the name of the first day of the week (Sunday), the second to the name of the second day of the week, and so on. |
abmon |
Defines the abbreviated month names corresponding to the %b field
descriptor.
Recognized values consist of 12 strings separated by semicolons. The first string corresponds to the abbreviated name for the first month of the year (Jan), the second to the abbreviated name for the second month of the year, and so on. |
mon |
Defines the full spelling of the month names corresponding to the %B
field descriptor.
Recognized values consist of 12 strings separated by semicolons. The first string corresponds to the full spelling of the name for the first month of the year (January), the second to the full spelling of the name for the second month of the year, and so on. |
d_t_fmt | Defines the string used for the standard date-and-time format corresponding to the %c field descriptor. The string can contain any combination of characters and field descriptors. |
d_fmt | Defines the string used for the standard date format corresponding to the %x field descriptor. The string can contain any combination of characters and field descriptors. |
t_fmt | Defines the string used for the standard time format corresponding to the %X field descriptor. The string can contain any combination of characters and field descriptors. |
am_pm |
Defines the strings used to represent a.m. (before noon) and p.m.
(afternoon) corresponding to the %p field descriptor.
Recognized values consist of two strings separated by semicolons. The first string corresponds to the a.m. designation, the second string corresponds to the p.m. designation. |
t_fmt_ampm |
Defines the string used for the standard 12-hour time format that
includes an
am_pm value (%p field descriptor).
This statement corresponds to the %r field descriptor. The string can contain any combination of characters and field descriptors. If the string is empty, the 12-hour format is not supported by the locale. |
era |
Defines how the years are counted and displayed for each era in a
locale, corresponding to the %E field descriptor modifier.
For each era, there must be one string in the following format: direction: offset: start_date: end_date: name: format The variables for the era string format are defined as follows:
An era value consists of one string (enclosed in quotation marks) for each era. If more than one era is specified, each era string is separated by a semicolon (;). |
era_d_fmt | Defines the string used to represent the date in alternate-era format corresponding to the %Ex field descriptor. The string can contain any combination of characters and field descriptors. |
era_t_fmt | Defines the locale's alternative time format as represented by the %EX field descriptor for strftime, strptime, and wcsftime. |
era_d_t_fmt | Defines the locale's alternative date-and-time format as represented by the %Ec field descriptor for strftime, strptime, and wcsftime. |
alt_digits |
Defines alternate strings for digits corresponding to the %O field
descriptor.
Recognized values consist of a group of strings separated by semicolons. The first string represents the alternate string for 0 (zero), the second string represents the alternate string for 1, and so on. You can specify a maximum of 100 alternate strings. |
Previous | Next | Contents | Index |
privacy and legal statement | ||
6494PRO_002.HTML |