User Guide

604 Chapter 3: ColdFusion Functions
The following example shows how the function formats negative values. The format includes a
negative sign before the value, or parentheses around the value, according to the formatting rules
of the current locale.
Example
<h3>LSEuroCurrencyFormat Example</h3>
<p>LSEuroCurrencyFormat 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><br>
Local: #LSEuroCurrencyFormat(100000, "local")#<br>
International: #LSEuroCurrencyFormat(100000, "international")#<br>
None: #LSEuroCurrencyFormat(100000, "none")#<br>
<Hr noshade>
</cfoutput>
</cfloop>
Input value Output if locale = French (Standard) Output if locale = English (US)
-1234.56 -1 234,56 ยค ($1,234.56)