Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
QLocale has good support for iso4217 currency codes (USD, GBP, EUR,...) and it's already possible to retrieve the current currency symbol using `currencySymbol()`. But it's not possible to retrieve other currency symbols.
Currency symbols are not unique. They depend on the system "locale". For example, "$" means USD in some countries, in others, it is "US$".
I suggest a method to retrieve other currency symbols from a `QLocale`.
Example:
Let's say that the current locale is "fr_FR". Currency: EUR, currency symbol "€". How to create a string with the currency USD and the symbol "$"?
Now, let's say I change locale and I pick Saint Lucia ("en-LC"). The same string should be using the symbol "US$".
Generalizing, how to create a string using a currency value in ISO4217 (`QLocale::CurrencyIsoCode`)?