No description available.
CurrencyFormat(number=[any], type=[string], locale=[string])
lsCurrencyFormat returns a currency value using the locale convention. Default value is local.
<!--- loop through list of locales; show currency values for 100,000 units --->
<bx:loop LIST="#Server.BOXLANG.SUPPORTEDLOCALES#" index="locale" delimiters=",">
<bx:set oldlocale = setLocale( locale ) >
<bx:output><p><b><I>#locale#</I></b>
Local: #lsCurrencyFormat( 100000, "local" )#
International: #lsCurrencyFormat( 100000, "international" )#
None: #lsCurrencyFormat( 100000, "none" )#
<hr noshade>
</bx:output>
</bx:loop>
lsCurrencyFormat returns a currency value using the specified locale.
writeDump( lsCurrencyFormat( 5, "local", "en_US" ) );
amount = 100;
locale = "en_US";
writeoutput( LSCurrencyFormat( amount, "local", locale ) ); // $100.00
writeoutput( LSCurrencyFormat( amount, "international", locale ) ); // USD 100.00
writeoutput( LSCurrencyFormat( amount, "none", locale ) ); // 100.00
locale = "ja_JP";
writeoutput( LSCurrencyFormat( amount, "local", locale ) ); // ¥100
writeoutput( LSCurrencyFormat( amount, "international", locale ) ); // JPY 100
writeoutput( LSCurrencyFormat( amount, "none", locale ) );
// 100