LSCurrencyFormat

Description

Returns a currency value using the locale convention. Default value is "local."

Category

International functions

Syntax


LSCurrencyFormat(number [, type ]) 

See also

LSEuroCurrencyFormat

Parameters

Parameter
Description
number
The currency value.
type
Currency type. Arguments are:
  • none    For example, 10.00
  • local    (default) For example, $10.00
  • international    For example, USD10.00

Currency output

The following table shows sample currency output for some locales supported by ColdFusion, in each format type: local, international, and none.
Locale
Format Type Output 
Dutch (Belgian)

Local: 100.000,00 BF

International: BEF100.000,00

None: 100.000,00 

Dutch (Standard)

Local: fl 100.000,00

International: NLG100.000,00

None: 100.000,00 

English (Australian)

Local: $100,000.00

International: AUD100,000.00

None: 100,000.00 

English (Canadian)

Local: $100,000.00

International: CAD100,000.00

None: 100,000.00 

English (New Zealand)

Local: $100,000.00 

International: NZD100,000.00

None: 100,000.00 

English (UK)

Local: £100,000.00

International: GBP100,000.00

None: 100,000.00 

English (US)

Local: $100,000.00

International: USD100,000.00

None: 100,000.00 

French (Belgian)

Local: 100.000,00 FB

International: BEF100.000,00

None: 100.000,00 

French (Canadian)

Local: 100 000,00 $

International: CAD100 000,00

None: 100 000,00 

French (Standard)

Local: 100 000,00 F

International: FRF100 000,00

None: 100 000,00 

French (Swiss)

Local: SFr. 100'000.00

International: CHF100'000.00

None: 100'000.00 

German (Austrian)

Local: öS 100.000,00

International: ATS100.000,00

None: 100.000,00 

German (Standard)

Local: 100.000,00 DM

International: DEM100.000,00

None: 100.000,00 

German (Swiss)

Local: SFr. 100'000.00

International: CHF100'000.00

None: 100'000.00 

Italian (Standard)

Local: L. 10.000.000

International: ITL10.000.000

None: 10.000.000 

Italian (Swiss)

Local: SFr. 100'000.00

International: CHF100'000.00

None: 100'000.00 

Norwegian (Bokmal)

Local: kr 100 000,00

International: NOK100 000,00

None: 100 000,00 

Norwegian (Nynorsk)

Local: kr 100 000,00

International: NOK100 000,00

None: 100 000,00 

Portuguese (Brazilian)

Local: R$100.000,00

International: BRC100.000,00

None: 100.000,00 

Portuguese (Standard)

Local: R$100.000,00

International: BRC100.000,00

None: 100.000,00 

Spanish (Mexican)

Local: $100,000.00

International: MXN100,000.00

None: 100,000.00 

Spanish (Modern)

Local: 10.000.000 Pts

International: ESP10.000.000

None: 10.000.000 

Spanish (Standard)

Local: 10.000.000 Pts

International: ESP10.000.000

None: 10.000.000 

Swedish

Local: 100.000,00 kr

International: SEK100.000,00

None: 100.000,00 

Example

<!--- 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> 





Banner.Novgorod.Ru