'How to get translated list of all country names in dotnet
I'm trying to build a dictionary of country names with their two character country code, but with the country name translated to a selected language.
I know the country code for the United Arab Emirates is AE, but what would I pass to an IStringLocalizer to get it translated?
Could I use something like the following?
var localizer = _localizer.WithCulture(new CultureInfo("fr-FR"));
var countryNameTranslated = localizer[103392].ToString();
But what I need is the complete list of two character country codes and their (ISO?) numbers, so I can iterate through all of them, using a selected culture code and the localizer to translate them all.
How do I get the complete list of 2 character codes and their numeric codes from the dotnet core Microsoft libraries? (Is this even possible?)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
