LSCurrencyFormat()
Formats a number in a locale-specific currency format.
LSCurrencyFormat( number=object, type=string, locale=locale );
Returns: String
Examples
amount = 100;
locale = 'en_US';
writeoutput(LSCurrencyFormat( amount, 'local', locale )); // $100.00
writeoutput(LSCurrencyFormat( amount, 'international', locale )); // USD 100.00
writeoutput(LSCurrencyFormat( amount, 'none', locale )); // 100.00
locale = 'ja_JP';
writeoutput(LSCurrencyFormat( amount, 'local', locale )); // ¥100
writeoutput(LSCurrencyFormat( amount, 'international', locale )); // JPY 100
writeoutput(LSCurrencyFormat( amount, 'none', locale )); // 100
See also
- Currency features
- Strings
- Formatting
- Internationalization
- DollarFormat()
- LSEuroCurrencyFormat()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)