当我使用formatNumber如下:为什么JSTL的formatNumber货币符号设置特定设置CURRENCYCODE
<fmt:formatNumber value="${amount}" type="currency" currencyCode="${currencyCode}" var="amt" />
如果我在地方en_US和货币代码很是欧元,我得到EUR
为标志,但如果我在语言环境en_GB,则获得€
。为什么要考虑地区?欧元不应该总是转换成€
?无论如何得到我期待使用formatNumber
的行为?
@jahroy,将改变数,这两者都不是可取的文本和格式的转换。 – Josh 2012-07-10 18:51:12
该文件建议你可以设置'currencySymbol'为任何你想要的:http://www.tutorialspoint.com/jsp/jstl_format_formatnumber_tag.htm – jahroy 2012-07-10 19:05:22
只是改变了我的答案... – jahroy 2012-07-10 19:06:19