currency — format number as currency, honoring default or specified locale
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.
Example: Displaying a value formatted as a currency
[filter currency]40.2[/filter]Example in action:
40.20
Example: Displaying a value in specific locale formatted as a currency
[filter currency.fr_FR]40.2[/filter]
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.8.0, 5.9.0 (git-head)
Interchange 5.9.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