LC_MONETARY Locale Category

The LC_MONETARY category source definition in locale source files specifies the rules and symbols used to format monetary quantities in the locale that is compiled from that source by the LOCALDEF utility.

The following keywords make up this category definition, and have operands that are strings or integers.

  • copy
  • int_curr_symbol
  • currency_symbol
  • mon_decimal_point
  • mon_thousands_sep
  • mon_grouping
  • positive_sign
  • negative_sign
  • int_frac_digits
  • frac_digits
  • p_cs_precedes
  • p_sep_by_space
  • n_cs_precedes
  • n_sep_by_space
  • p_sign_posn
  • n_sign_posn
  • left_paranthesis
  • right_paranthesis
  • debit_sign
  • credit_sign
  • 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. If not defined, the symbol 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 string representing a sequence 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 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 sign string, 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 sign string, 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:

    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.
    5 Use debit-sign or credit-sign for p_sign_posn or n_sign_posn. If not defined, it defaults to -1. This option is an IBM extension to the POSIX standard.

    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 (""). This is an IBM extension to the POSIX standard.

    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 (""). This is an IBM extension to the POSIX standard.

    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 (""). This is an IBM extension to the POSIX standard.

    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 (""). This is an IBM extension to the POSIX standard.

    Example: LC_MONETARY Locale Category Definition



    Internationalization
    Localization and Locales


    Customize a Locale


    Locale Categories
    Locale Source Files