货币区域设置 - 如何获取不同国家/地区的区域设置

时间:2014-06-20 03:19:39

标签: java javascript currency currency-formatting

public  double showinbrl(double amount, double rate) {
        double amountinbrl = amount * rate; 
        NumberFormat brl = NumberFormat.getCurrencyInstance(Locale.BRAZIL); 
        brl.format(amountinbrl);
        return amountinbrl;
    }

如何获取不同国家/地区的区域设置...我无法找到巴西的区域设置..

1 个答案:

答案 0 :(得分:0)

试试这个:

NumberFormat brl = NumberFormat.getCurrencyInstance(Locale.forLanguageTag("pt_BR"));