How to select correct country from currency ISO code in C#

Viewed 42

I am building an app where the user can input their currency via the ISO 4127 code (EUR,USD, JPY, etc).

As a eye-candy feature, I wanted to add a tooltip to the TextBox control where one could find some inforamtion about the currency, that is the translated name, the symbol and the native name.

For the translated and symbol all is good, I found all I need (I found an amazing repository with everything translated), but when it comes to the native name I got into an interesting a peculiar issue:

As an example, let's take the UK Pounds (ISO "GBP"). Using the methods available from the CultureInfo and RegionInfo class I get that there are 3 regions adopting the GBP:

  1. the Welsch one, with CurrencyNativeName = "Punt Prydain"
  2. the British one, with CurrencyNativeName = "Pound Sterling"
  3. the Scottish one, with CurrencyNativeName = "Punnd Sasannach"

The question is: is there any "default international native name"? in this case, usually one means the british name, but all of these 3 region have as parent the "en" language.

This question does not intend to raise any political or regional issue at all, I'm just asking if there is a default value when somebody chooses a courrency used in multiple countries or regions.

1 Answers

new RegionInfo("GB").CurrencyNativeName will get you the "default international native name" for the UK (which is "Pound Sterling"), where "GB" is the two-letter code defined in ISO 3166.

Related