I am looking for a way to get the language name from the language code.
en -> English zh -> Chinese jp -> Japanese fr -> French de -> German
etc...
Console.WriteLine(new CultureInfo("en").DisplayName);
Note that DisplayName will format the name for the current language set. If you want it to always be in English, use the username.
I just found this: http://www.csharp-examples.net/culture-names/
not sure if this helps.
Something like this will work:
var allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures); var en = allCultures.FirstOrDefault (c => c.Name == "en").DisplayName; var de = allCultures.FirstOrDefault (c => c.Name == "de").DisplayName;
CultureInfo.DisplayName will contain what you are looking for.
Source: https://habr.com/ru/post/1791114/More articles:JMS alternative - javaHTML canvas displays text slightly different than browsers - javascriptjQuery div position in the middle of the page - jquery.NET Framework and Version Compatibility - .netsetting the activerecord attribute based on virtual attributes - ruby-on-railsXMPP / AMQP / Websockets vs Pusher / Beacon push? - websockethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1791116/clean-way-in-rails-to-conditionally-change-the-linkto-location&usg=ALkJrhjJ2ohgSaE3DnalY-OyHaMvoTUYfwYouTube API Question - javascriptWas there an obsolete, canceled or replaced PyFacebook library? - facebookComparison of HTML5 Canvas 2D and NaCl pp :: Graphics2D (performance) - html5All Articles