setting locale for formatting currencies
Author: nikb
Publication Date: 6/19/2012 15:48
Hi,
in the help section there is a page about formatting numbers and especially handling the placement of the currency symbol. It is great that there is the possibility to use these format strings, but I'm wondering where I can set the currency symbol to use? In other .format methods the locale is settable, but not for CMS_INPUT_NUMBER values. Sure I can write a beanshell script, but is there a easier way?
cheers,
Nik
Tags: currency, format, formatierung, formatting, nummern, symbol, währung, zahlen
-
Author: Peter_Jodeleit - 6/19/2012 17:05
There is no special method for writing currencies. But there is no need to use a script, you can handle this in template code with the help of the "class" method:
$CMS_VALUE(class("java.text.NumberFormat").getCurrencyInstance(#global.locale).format(my_number))$
0
Please sign in to leave a comment.
Comments
1 comment