Those patterns are defined for all locales in the CLDR data we use, and they should be correct.
If not, you'd do this:
<currency_formatter>
<ae:parameter name="format">
<ae:parameter name="en">¤#,##0.00</ae:parameter>
<ae:parameter name="de">#.##0,00 ¤</ae:parameter>
</ae:parameter>
</currency_formatter>
And so forth. It's exactly like for a number formatter, with the only
exception that the "¤" symbol (U+00A4, http://www.fileformat.info/info/unicode/char/00a4/index.htm)
is used as the placeholder for the currency symbol.
If you simply want to format a value using a different currency than the one currently set on the active locale, do $tm->_c(123.45, 'some.domain', '@currency=GBP'); You can of course also define the locale in translations.xml to use a different currency than the default for that locale.
- David On 02.03.2010, at 22:54, Yossi Ben Haim wrote:
Hello,Was wondering if anyone can give me quick guidelines on how I can control the format of numbers generated by the translation manager ($tm->_c()).I have looked at the FAQ but it doesn't contain an example for currency formatting. I have can define a filter function (which works) so I can control the output and format it in a round about way... but obviously there must be better ways to do this.here is a the relevant code from my translations xml: <currency_formatter> <ae:parameters><ae:parameter name="type">currency</ae:parameter> <ae:parameter name="format">number</ae:parameter></ae:parameters> <filters><filter>xxxxxXxxxxTranslationFilters::currencyFilter</filter></filters> </currency_formatter>I have tried to edit the type and format parameters in many ways, without getting any results or even exceptions...I'd appreciate any help. Thank you, Yossi. _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
