lsCurrencyFormat

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]) → returns string

lsCurrencyFormat Argument Reference

number numeric
Required

type string

Values:
  • local
  • international
  • none

Examples sample code invoking the lsCurrencyFormat function

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>

Fork me on GitHub