I've a website and I need to display some language name in the current culture, based of the two character language name.
E.g. I need to display when the culture is FRench:
- fr -> Français
- en -> Anglais
- de -> Allemand
In German(de) culture
- fr -> Français
- en -> Anglais
- de -> Allemand
...
The currentThread culture is already correct(meaning that I'm in "FR" localization).
The problem is that if I'm in the french culture and I do:
System.Globalization.CultureInfo.GetCultureInfo("de")
I receive this object:
Calendar: {System.Globalization.GregorianCalendar}
CompareInfo: {CompareInfo - de}
CultureTypes: NeutralCultures | InstalledWin32Cultures | FrameworkCultures
DateTimeFormat: {System.Globalization.DateTimeFormatInfo}
DisplayName: "German"
EnglishName: "German"
IetfLanguageTag: "de"
IsNeutralCulture: true
IsReadOnly: true
KeyboardLayoutId: 7
LCID: 7
Name: "de"
NativeName: "Deutsch"
NumberFormat: {System.Globalization.NumberFormatInfo}
OptionalCalendars: {System.Globalization.Calendar[1]}
Parent: {}
TextInfo: {TextInfo - de}
ThreeLetterISOLanguageName: "deu"
ThreeLetterWindowsLanguageName: "DEU"
TwoLetterISOLanguageName: "de"
UseUserOverride: false
And I wished that the display name is in the current locale(So "Allemand").
I'm sure it's possible, am I missing a language pack? At which level? Windows? ASP? MVC? Or should I use a different code?