I'm trying to guess which country a BCP-47 code belongs to. I'm aware that this would provide a list of multiple countries. Nevertheless, I would like to try.
Is that possible using any of the classes within System.Globalization?
Why I'm doing this: On my website, I would like to auto fill a country. I'm first attempting to geolocate the IP address. If that fails, I would like to try and guess the country using navigator.language (JavaScript).
This fails for e.g. nb (Norwegian Bokmål -- ideally it would produce Norway):
var cultureInfo = new CultureInfo("nb");
var regionInfo = new RegionInfo(cultureInfo.LCID); // Throws because culture is not neutral
Is it perhaps possible to aggregate some data from System.Globalization and create a dictionary of sorts upon initialization?