val currency = Currency.getInstance("RON")
val symbol = currency.symbol //returns "RON"
val currency = Currency.getInstance(Locale("ro", "RO"))
val symbol = currency.symbol //returns "RON"
val locales = Locale.getAvailableLocales()
for (l in locales) {
if (null == l.country || l.country.isEmpty()) continue
val c = Currency.getInstance(l)
if(c.symbol == "RON") {
println("Result: ${c.getSymbol(l)}")
}
}
1条答案
按热度按时间gcuhipw91#
或者,您可以使用以下代码创建函数
一月一日