mat*_*986 3 coldfusion currency-formatting
我正在尝试格式化货币值以英镑输出,但是在尝试从$更改为£时遇到了麻烦。我目前有以下...
numberFormat(TOTAL_VALUE_GBP,'_$,9.99')
Run Code Online (Sandbox Code Playgroud)
我需要做什么才能输出为£?
您可以使用lsCurrencyFormat()功能。首先用于setLocale()在此处将语言环境信息设置为您想要的语言环境(英语(英国))。然后使用lsCurrencyFormat()。
<cfset setLocale('English (UK)')>
<cfset amountInGBP = lsCurrencyFormat(100000, "local")>
<cfoutput>#amountInGBP#</cfoutput>
Run Code Online (Sandbox Code Playgroud)