Freemarker格式将BigDecimal转换为德语语言环境无法正常工作 [英] Freemarker format BigDecimal to German Locale not working properly
本文介绍了Freemarker格式将BigDecimal转换为德语语言环境无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
遵循 FreeMarker的文档:
Following the documentation of FreeMarker :
使用:
<#setting number_format="0.##">
<#setting locale="hu">
German people write: ${12345678}
应如图所示输出,但我得到的是以下内容:
Should output as shown in picture but instead what i get is the below :
对于输入new BigDecimal(4436372342.10)
=> 4 436 372 342,10
不具有.
而是具有个空格.
which doesn't have .
but instead has spaces .
为什么会这样?
推荐答案
似乎存在文档错误.
locale="hu"
设置匈牙利语言环境.其千位分隔符为' '
.
sets a Hungarian locale. Its thousands separator is ' '
.
要设置德语语言环境,请尝试
To set a German locale, try
locale="de_DE"
相反.具有'.'
作为千位分隔符.
instead. That has '.'
as thousands separator.
这篇关于Freemarker格式将BigDecimal转换为德语语言环境无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文