Name

currency — format number as currency, honoring default or specified locale

ATTRIBUTES

Attribute Pos. Req. Default Description

DESCRIPTION

The filter formats input number as a currency. All currency-related options and default locale are honored, and a specific locale can also be set as well.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

Example: Displaying a value formatted as a currency

[filter currency]40.2[/filter]

          

Example: Displaying a value in specific locale formatted as a currency

[filter currency.fr_FR]40.2[/filter]

NOTES

In Interchange version 4.6.0, this symbol changed type from Filter to System Tag.

AVAILABILITY

currency is available in Interchange versions:

4.6.0, 4.6.0, 4.8.0, 5.0.0, 5.2.0, 5.4.0, 5.6.0, 5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/currency.coretag
Lines: 21


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: currency.coretag,v 1.5 2007-03-30 23:40:49 pajamian Exp $

UserTag currency            Order        convert noformat
UserTag currency            hasEndTag
UserTag currency            Interpolate
UserTag currency            addAttr
UserTag currency            PosNumber    2
UserTag currency            Version      $Revision: 1.5 $
UserTag currency            Routine      <<EOR
sub {
my($convert,$noformat,$opt,$amount) = @_;
return Vend::Util::currency($amount, $noformat, $convert, $opt);
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

PriceCommas(7ic), PriceDivide(7ic), subtotal(7ic), Locale(7ic), salestax(7ic)

DocBook! Interchange!