[ Previous | Next | Table of Contents | Index | Library Home |
Legal |
Search ]
Files Reference
Defines rules and symbols for
formatting monetary numeric information.
The LC_MONETARY
category of a locale definition source file defines rules and symbols for
formatting monetary numeric information. This category begins with an
LC_MONETARY category header and terminates with an
END LC_MONETARY category trailer.
All operands for the
LC_MONETARY category keywords are defined as string or integer
values. String values are enclosed by " " (double-quotation
marks). All values are separated from the keyword they define by one or
more spaces. Two adjacent double-quotation marks indicate an undefined
string value. A -1 indicates an undefined integer value. The
following keywords are recognized in the LC_MONETARY
category:
copy
| Specifies the name of an existing locale to be used as the definition of
this category. If a copy statement is included in the file,
no other keyword can be specified.
|
int_curr_symbol
| Specifies the string used for the international currency symbol.
The operand for the int_curr_symbol keyword is a four-character
string. The first three characters contain the alphabetic
international-currency symbol. The fourth character specifies a
character separator 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 string used for the decimal delimiter used to format
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 the
mon_grouping keyword consists of a sequence of semicolon-separated
integers. Each integer specifies the number of digits in a
group. The initial integer defines the size of the group immediately to
the left of the decimal delimiter. The following integers define
succeeding groups to the left of the previous group. If the last
integer is not -1, the size of the previous group (if any) is repeatedly used
for the remainder of the digits. If the last integer is -1, no further
grouping is performed.
The following is an example of
the interpretation of the mon_grouping statement. Assuming
the value to be formatted is 123456789 and the operand for the
mon_thousands_sep keyword is ' (single-quotation
mark), the following results occur:
|
mon_grouping Value
| Formatted Value
|
3;-1
| 123456'789
|
3
| 123'456'789
|
3;2;-1
| 1234'56'789
|
3;2
| 12'34'56'789
- -1
- 123456789
|
positive_sign
| Specifies the string used to indicate a nonnegative-valued formatted
monetary quantity.
|
negative_sign
| Specifies the string used to indicate a negative-valued 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:
- 0
- Indicates that the currency symbol follows the monetary quantity.
- 1
- Indicates that the currency symbol precedes the monetary quantity.
|
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:
- 0
- Indicates that no space separates the currency symbol from the monetary
quantity.
- 1
- Indicates that a space separates the currency symbol from the monetary
quantity.
- 2
- Indicates that a space separates the currency symbol and the
positive_sign string, if adjacent.
|
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:
- 0
- Indicates that the currency symbol follows the monetary quantity.
- 1
- Indicates that the currency symbol precedes the monetary quantity.
|
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:
- 0
- Indicates that no space separates the currency symbol from the monetary
quantity.
- 1
- Indicates that a space separates the currency symbol from the monetary
quantity.
- 2
- Indicates that a space separates the currency symbol and the
negative_sign string, if adjacent.
|
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:
- 0
- Indicates that a left_parenthesis and
right_parenthesis symbol enclose both the monetary quantity and the
int_curr_symbol or currency_symbol string.
- 1
- Indicates that the positive_sign string precedes the quantity
and the int_curr_symbol or currency_symbol
string.
- 2
- Indicates that the positive_sign string follows the quantity
and the int_curr_symbol or currency_symbol
string.
- 3
- Indicates that the positive_sign string immediately precedes
the int_curr_symbol or currency_symbol string.
- 4
- Indicates that the positive_sign string immediately follows the
int_curr_symbol or currency_symbol string.
|
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:
- 0
- Indicates that a left_parenthesis and
right_parenthesis symbol enclose both the monetary quantity and the
int_curr_symbol or currency_symbol string.
- 1
- Indicates that the negative_sign string precedes the quantity
and the int_curr_symbol or currency_symbol
string.
- 2
- Indicates that the negative_sign string follows the quantity
and the int_curr_symbol or currency_symbol
string.
- 3
- Indicates that the negative_sign string immediately precedes
the int_curr_symbol or currency_symbol string.
- 4
- Indicates that the negative_sign string immediately follows the
int_curr_symbol or currency_symbol string.
|
debit_sign
| Specifies the string used for the debit symbol (DB) to
indicate a nonnegative formatted monetary quantity.
|
credit_sign
| Specifies the string used for the credit symbol (CR) to
indicate a negative formatted monetary quantity.
|
left_parenthesis
| Specifies the character, equivalent to a ( (left parenthesis), used by
the p_sign_posn and n_sign_posn statements to enclose a
monetary quantity and currency symbol.
|
right_parenthesis
| Specifies the character, equivalent to a ) (right parenthesis), used by
the p_sign_posn and n_sign_posn statements to enclose a
monetary quantity and currency symbol.
|
A unique customized monetary
format can be produced by changing the value of a single statement. For
example, the following table shows the results of using all combinations of
defined values for the p_cs_precedes, p_sep_by_space,
and p_sign_posn statements.
Results of Various Locale Variable Value Combinations
|
p_cs_precedes
| p_sign_posn
| 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 an example of a
possible LC_MONETARY category listed in a locale definition source
file:
LC_MONETARY
#
int_curr_symbol "<U><S><D>"
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>
debit_sign "<D><B>"
credit_sign "<C><R>"
left_parenthesis "<left-parenthesis>"
right_parenthesis "<right-parenthesis>"
#
END LC_MONETARY
This category of the locale
definition source file format is part of the Base Operating System (BOS)
Runtime.
/usr/lib/nls/loc/*
| Specifies locale definition source files for supported locales.
|
/usr/lib/nls/charmap/*
| Specifies character set description (charmap) source files for
supported locales.
|
The locale command, localedef command.
Character Set Description (charmap) Source File
Format , Locale Definition Source File Format ,
Locale Method Source File Format
.
For specific information about other locale categories and their keywords,
see the LC_COLLATE category, LC_CTYPE category, LC_MESSAGES category, LC_NUMERIC category, and LC_TIME category for the locale definition
source file format.
Changing Your
Locale and Understanding the Locale Definition Source
File in AIX 5L Version 5.1 System Management Concepts:
Operating System and Devices.
[ Previous | Next | Table of Contents | Index |
Library Home |
Legal |
Search ]