Android获取Locale Currency

时间:2016-12-01 04:17:14

标签: android concurrency locale

我在这里碰到了一件小事。 问题是我想得到用户的语言环境货币,所以我这样做:

final Locale currentLocale = getResources().getConfiguration().locale;
final Currency currency = Currency.getInstance(currentLocale);
mCurrencyCode = currency.getCurrencyCode();

这给了我:澳元和澳大利亚一样

问题?好吧,我在新西兰,货币代码 NZD

我怎样才能获得正确的货币代码?

干杯

0 个答案:

没有答案