This category defines the rules and symbols used to format monetary
quantities. The operands are strings or integers. The following keywords
are supported:
- copy
- Specifies the name of an existing locale to be used as the source
for the definition of this category. If this keyword is specified,
no other keyword should be present in this category. If the locale
is not found, an error is reported and no locale output is created.
The copy keyword cannot specify a locale that also specifies
the copy keyword for the same category.
- int_curr_symbol
- Specifies the international currency symbol. The operand is
a four-character string, with the first three characters containing
the alphabetic international currency symbol in accordance with those
specified in ISO4217 Codes
for the Representation of Currency and Funds. The fourth character is the character
used to separate the international currency symbol from the monetary
quantity.
The following value may also be specified, though it
is not If not defined, it defaults to the empty string ("").
- currency_symbol
- Specifies the string used as the local currency symbol. If not
defined, it defaults to the empty string ("").
- mon_decimal_point
- The string used as a decimal delimiter to format monetary quantities.
If not defined it defaults to the empty string ("").
- mon_thousands_sep
- Specifies the string used as a separator for groups of digits
to the left of the decimal delimiter in formatted monetary quantities.
If not defined, it defaults to the empty string ("").
- mon_grouping
- Defines the size of each group of digits in formatted monetary
quantities. The operand is a sequence of integers separated by semicolons.
Also, for compatibility, it may be a string of integers separated
by semicolons. Each integer specifies the number of digits in each
group, with the initial integer defining the size of the group immediately
preceding the decimal delimiter, and the following integers defining
the preceding groups. If the last integer is not -1, then the
size of the previous group (if any) is used repeatedly for the rest
of the digits. If the last integer is -1, then no further grouping
is performed. If not defined, mon_grouping defaults to -1
which indicates that no grouping. An empty string is interpreted as -1.
- positive_sign
- A string used to indicate a formatted monetary quantity with
a non-negative value. If not defined, it defaults to the empty string
("").
- negative_sign
- Specifies a string used to indicate a formatted monetary quantity
with a negative value. If not defined, it defaults to the empty string
("").
- int_frac_digits
- Specifies an integer representing the number of fractional digits
(those to the right of the decimal delimiter) to be displayed in a
formatted monetary quantity using int_curr_symbol. If not
defined, it defaults to -1.
- frac_digits
- Specifies an integer representing the number of fractional digits
(those to the right of the decimal delimiter) to be displayed in a
formatted monetary quantity using currency_symbol. If not
defined, it defaults to -1.
- p_cs_precedes
- Specifies an integer set to 1 if the currency_symbol or int_curr_symbol precedes
the value for a non-negative formatted monetary quantity, and set
to 0 if the symbol succeeds the value. If not defined,
it defaults to -1.
- p_sep_by_space
- Specifies an integer set to 0 if no space separates
the currency_symbol or int_curr_symbol from
the value for a non-negative formatted monetary quantity, set to 1
if a space separates the symbol from the value, and set to 2 if a
space separates the symbol and the string sign, if adjacent. If not
defined, it defaults to -1.
- n_cs_precedes
- An integer set to 1 if the currency_symbol or int_curr_symbol precedes
the value for a negative formatted monetary quantity, and set to 0 if
the symbol succeeds the value. If not defined, it defaults to -1.
- n_sep_by_space
- An integer set to 0 if no space separates the currency_symbol or int_curr_symbol from
the value for a negative formatted monetary quantity, set to 1 if
a space separates the symbol from the value, and set to 2 if a space
separates the symbol and the string sign, if adjacent. If not defined,
it defaults to -1.
- p_sign_posn
- An integer set to a value indicating the positioning of the
positive_sign for a non-negative formatted monetary quantity. The
following integer values are recognized; if not defined, it defaults
to -1.
- 0
- Parentheses surround the quantity and the currency_symbol or int_curr_symbol.
- 1
- The sign string precedes the quantity and the currency_symbol or int_curr_symbol.
- 2
- The sign string succeeds the quantity and the currency_symbol or int_curr_symbol.
- 3
- The sign string immediately precedes the currency_symbol or int_curr_symbol.
- 4
- The sign string immediately succeeds the currency_symbol or int_curr_symbol.
part of the POSIX standard.
- 5
- Use debit-sign or credit-sign for p_sign_posn or n_sign_posn.
- n_sign_posn
- An integer set to a value indicating the positioning of the negative_sign for
a negative formatted monetary quantity. The recognized values are
the same as for p_sign_posn. If not defined, it defaults
to -1.
- left_parenthesis
- The symbol of the locale's equivalent of ( to form
a negative-valued formatted monetary quantity together with right_parenthesis.
If not defined, it defaults to the empty string ("").
Note: This
is an IBM-specific extension.
- right_parenthesis
- The symbol of the locale's equivalent of ) to form
a negative-valued formatted monetary quantity together with left_parenthesis.
If not defined, it defaults to the empty string ("");
Note: This
is an IBM-specific extension.
- debit_sign
- The symbol of locale's equivalent of DB to indicate
a non-negative-valued formatted monetary quantity. If not defined,
it defaults to the empty string ("");
Note: This is an IBM-specific
extension.
- credit_sign
- The symbol of locale's equivalent of CR to indicate
a negative-valued formatted monetary quantity. If not defined, it
defaults to the empty string ("");
Note: This is an IBM-specific
extension.
- int_p_cs_precedes
- Specifies an integer set to 1 if the int_curr_symbol precedes
the value for a non-negative formatted monetary quantity, and set
to 0 if the symbol succeeds the value. If not defined,
it defaults to -1.
- int_n_cs_precedes
- An integer set to 1 if theint_curr_symbol precedes
the value for a negative formatted monetary quantity, and set to 0 if
the symbol succeeds the value. If not defined, it defaults to -1.
- int_p_sep_by_space
- Specifies an integer set to 0 if no space separates
the int_curr_symbol from the value for a non-negative formatted
monetary quantity, set to 1 if a space separates the symbol from the
value, and set to 2 if a space separates the symbol and the string
sign, if adjacent. If not defined, it defaults to -1.
- int_n_sep_by_space
- An integer set to 0 if no space separates the int_curr_symbol from
the value for a negative formatted monetary quantity, set to 1 if
a space separates the symbol from the value, and set to 2 if a space
separates the symbol and the string sign, if adjacent. If not defined,
it defaults to -1.
- int_p_sign_posn
- For a non-negative monetary quantity, the following integer
values are recognized:
- 0
- Parentheses surround the quantity and the int_curr_symbol.
- 1
- The sign string precedes the quantity and the int_curr_symbol.
- 2
- The sign string succeeds the quantity and int_curr_symbol.
- 3
- The sign string immediately precedes the int_curr_symbol.
- 4
- The sign string immediately succeeds the currency_symbol or int_curr_symbol.
- int_n_sign_posn
- For a negative monetary quantity, the following integer values
are recognized:
- 0
- Parentheses surround the quantity and the int_curr_symbol.
- 1
- The sign string precedes the quantity and the int_curr_symbol.
- 2
- The sign string succeeds the quantity and int_curr_symbol.
- 3
- The sign string immediately precedes the int_curr_symbol.
- 4
- The sign string immediately succeeds the currency_symbol or int_curr_symbol.
Figure 1 is an example of the definition of the LC_MONETARY category.
Figure 1. Example
LC_MONETARY definitionescape_char /
comment_char %
%%%%%%%%%%%%%
LC_MONETARY
%%%%%%%%%%%%%
int_curr_symbol "<J><P><Y><space>"
currency_symbol "<yen>"
mon_decimal_point "<period>"
mon_thousands_sep "<comma>"
mon_grouping 3
positive_sign ""
negative_sign "<hyphen-minus>"
int_frac_digits 0
frac_digits 0
p_cs_precedes 1
p_sep_by_space 0
n_cs_precedes 1
n_sep_by_space 0
p_sign_posn 1
n_sign_posn 1
debit_sign "<D><B>"
credit_sign "<C><R>"
left_parenthesis "<left-parenthesis>"
right_parenthesis "<right-parenthesis>"
int_p_cs_precedes -1
int_n_cs_precedes -1
int_p_sep_by_space -1
int_n_sep_by_space -1
int_p_sign_posn -1
int_n_sign_posn -1
END LC_MONETARY