Acquiring a country's currency code

后端 未结 4 659
逝去的感伤
逝去的感伤 2020-12-19 11:45

I have a problem getting a country\'s currency code. My task is to get the user\'s location, find out what country he is right now and get this country\'s currency code. Her

4条回答
  •  感动是毒
    2020-12-19 12:13

    String lang = Locale.getDefault().getDisplayLanguage();
    Locale locale = new Locale(lang, COUNTRY_YOU_HAVE);
    

提交回复
热议问题