LSCurrencyFormat

Formats a number in a locale-specific currency format.

Returns: string

Usage

LSCurrencyFormat( number [, type [, locale ] ] )

Arguments

Argument Description Default
number
(object, required)

Currency value

type
(string, optional)
  • local: the currency format and currency symbol used in the locale.
  • international: the international standard currency format and currency symbol of the locale.
  • none: the currency format used in the locale without a currency symbol.

local

locale
(locale, optional)

Locale to use instead of the locale of the page when processing the function

Examples

<cfscript>
  amount = 100;
  
  locale = 'en_US';
  LSCurrencyFormat( amount, 'local', locale ); // $100.00
  LSCurrencyFormat( amount, 'international', locale ); // USD 100.00
  LSCurrencyFormat( amount, 'none', locale ); // 100.00
  
  locale = 'ja_JP';
  LSCurrencyFormat( amount, 'local', locale ); // ¥100
  LSCurrencyFormat( amount, 'international', locale ); // JPY 100
  LSCurrencyFormat( amount, 'none', locale ); // 100
</cfscript>

See also