Is it possible to obtain in any way the currency that the user uses, that is, the symbol: $, € ....
?
Is it possible to obtain in any way the currency that the user uses, that is, the symbol: $, € ....
?
You can use Locale
of java. This will return the values of the regional configuration by default of the user.
Locale locale= Locale.getDefault();
System.out.println("Locale: " + locale.getDisplayName()); //Localidad
Currency currency = Currency.getInstance(locale); //Datos configurado por defecto segun la localidad.
System.out.println("Currency Code: " + currency.getCurrencyCode()); //El codigo configurado por ejemplo (USD, etc)
System.out.println("Simbolo: " + currency.getSymbol()); //El simbolo que tu buscas, por ejemplo : $, €, etc..