Is there a built in method in .NET to convert a culture code into a user-friendly name? E.g:
CultureInfo
has a property called DisplayName
var culture = CultureInfo.GetCultureInfo("en-GB");
var displayName = culture.DisplayName;
DisplayName
gives you a localized version of the name.
There is also a EnglishName
property. ;)
string displayName;
CultureInfo cultureInfo = CultureInfo.GetCultureInfo("fo-FO");
displayName = cultureInfo.DisplayName;
EDIT:
Removed if (culture != null)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With