4.17. currency

4.17.1. Summary

Parameters: convert noformat

Positional parameters in same order.

Pass attribute hash as last to subroutine: no

Interpolates container text by default.

This is a container tag, i.e. [currency] FOO [/currency]. Nesting: NO

Invalidates cache: no

Called Routine:

ASP-like Perl call:

         convert => VALUE,
         noformat => VALUE,


    $Tag->currency($convert, $noformat, $BODY);
    [currency convert noformat]
Parameters Description Default
noformat   DEFAULT_VALUE
Attributes Default
interpolate No
reparse Yes
Invalidates cache no
Container tag Yes
Has Subtags No
Nests No

Tag expansion example:

    [currency convert noformat]
    TODO: (tag result)

ASP-like Perl call:

   $Tag->currency(  { convert => VALUE_convert
                       noformat => VALUE_noformat
}, $body  );

or similarly with positional parameters,

    $Tag->currency(convert,noformat, $attribute_hash_reference, $body);

4.17.2. Description

When passed a value of a single number, formats it according to the currency specification. For instance:


will display:


or something else depending on the Locale and PriceCommas settings. It can contain a [calc] region. If the optional "convert" parameter is set, it will convert the value according to PriceDivide> for the current locale. If Locale is set to fr_FR, and PriceDivide for fr_FR is 0.167, the following sequence

    [currency convert=1] [calc] 500.00 + 1000.00 [/calc] [/currency]

will cause the number 8.982,04 to be displayed. convert noformat