Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# - How can I get the language name from the language code?

I'm looking for a way to get the language name from the language code.

en -> English
zh -> Chinese
jp -> Japanese
fr -> French
de -> German

etc...

like image 644
Justin808 Avatar asked Feb 10 '11 01:02

Justin808


1 Answers

Console.WriteLine(new CultureInfo("en").DisplayName);

Note that DisplayName will format the name for the currently set language. If you want it to always be in English, use EnglishName.

like image 72
MikeP Avatar answered Sep 27 '22 01:09

MikeP