Closed (fixed)
Project:
Currency
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2012 at 00:49 UTC
Updated:
24 Jul 2013 at 08:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoThe attached patch adds the input filter from 7.x-1.x in a slightly improved form: better UI texts, filter tips, and cleaner and more flexible code, altered to use the new conversion API from #1848966: Pluggable currency conversion, on which this patch of course depends.
Comment #2
xanoPatch depends on #1848966: Pluggable currency conversion.
There are now two input filters: one to insert exchange rates, and one to convert amounts from one currency to another. It has tests too.
Comment #3
xanoThere is just one input filter, which converts amounts. If the amount is not given, or if it is 1, then it functions as an exchange rate display.
Comment #4
xanoAmounts need to be parsed using bartfeenstra/currency, and I'd like to add a filter to format/localize currency amounts.
Comment #5
xanoThe patch adds two input filters:
[currency:currency_code_from:currency_code_to],[currency:currency_code_from:currency_code_to:amount]to convert amounts from one currency to another. This filter is identical to the one in 7.x-1.x, with the exception that the amount may be in a localized format.[currency-localize:currency_code:amount]to display an amount in the current locale. This input filter is not cacheable.Comment #6
xanoComment #8
xano