Returns a currency value using the locale convention. Default value is "local."
LSCurrencyFormat(number [, type ])
Parameter |
Description |
---|---|
number |
The currency value. |
type |
Currency type. Arguments are:
|
The following table shows sample currency output for some locales supported by ColdFusion, in each format type: local
, international
, and none
.
<!--- This shows LSCurrencyFormat ---> <html> <head> <title>LSCurrencyFormat Example</title> </head> <body> <H3>LSCurrencyFormat Example</H3> <P>LSCurrencyFormat returns a currency value using the locale convention. Default value is "local." <!--- loop through a list of locales and 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><BR> Local: #LSCurrencyFormat(100000, "local")#<BR> International: #LSCurrencyFormat(100000, "international")#<BR> None: #LSCurrencyFormat(100000, "none")#<BR> <Hr noshade> </cfoutput> </CFLOOP> </body> </html>