Formats a number in a locale-specific currency format. For countries that use the euro, the result depends on the JVM.
[type - quicky]
local: the currency format and currency symbol used locally.
- With JDK 1.3, the default for Euro Zone: local currency.
- With JDK 1.4, the default for Euro Zone: euro.
international: the international standard currency format
none: the local currency format; no currency symbol
lsCurrencyFormat(number [, type, locale])
→ returns string
local
local
international
none
en
de_DE
de_CH
...
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 --->
<cfloop LIST = "#Server.Coldfusion.SupportedLocales#"
index = "locale" delimiters = ",">
<cfset oldlocale = setLocale(locale)>
<cfoutput><p><b><I>#locale#</I></b>
Local: #lsCurrencyFormat(100000, "local")#
International: #lsCurrencyFormat(100000, "international")#
None: #lsCurrencyFormat(100000, "none")#
<hr noshade>
</cfoutput>
</cfloop>
lsCurrencyFormat returns a currency value using the specified locale.
writeDump(lsCurrencyFormat(5, 'local', 'en_US'));
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.