Why is jstl's formatNumber currency symbol locale specific when setting currencyCode

前端 未结 1 395
悲哀的现实
悲哀的现实 2021-01-15 12:31

I\'m using formatNumber as follows:




        
相关标签:
1条回答
  • 2021-01-15 13:14

    Locale is taken into acount so the output makes sense to the user.

    As a silly American (who lives in the en_US locale) I have no idea what that funky symbol means.

    EUR makes perfect sense to me.

    A quick google suggests you can set the currencySymbol attribute to whatever you want:

    <fmt:formatNumber value="${amount}" type="currency" currencySymbol="FOO" currencyCode="${currencyCode}" var="amt" />
    
    0 讨论(0)
提交回复
热议问题