Code to get currency symbol:
Currency currency = null;
Locale locale = null;
String currencySymbol = null;
/*Get List of available countries from liferay country table*/
List<Country> countryCode = CountryServiceUtil.getCountries();
for(Country country:countryCode)
{
try{
locale = new Locale.Builder().setRegion(country.getA2()).build();
currency = Currency.getInstance(locale);
currencySymbol = currency.getSymbol(locale);
System.out.println("currency symbol is......"+currencySymbol);}
catch(Exception e){
System.out.println("exception..."+e);
}
Sunday, 12 November 2017
05:00
MR: EDITOR
TEST
I am Java Developer. I have 6 year Experiance in this field and like to post in blogging. So keep sharing and like my post
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment