Share via

what is the Name of CurrentCulture?

mc 6,801 Reputation points
2026-02-26T04:25:30.7066667+00:00

I am using .net maui and I want to get the language of the environment.

I use CultureInfo.CurrentCulture.Name and I can get the current language.

and I want to get more

'//Chinese Simplified

//English

//Traditional Chinese

//Japanese

//Germany

//Portuguese

//Spanish

//French

//Korean

//Russian

//Italian

//Vietnamese

//Arabic '

how to get the name of the languges?

for-example If I change the language to chinsese simplified I can get 'zh-Hans-CN'

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Gade Harika (INFOSYS LIMITED) 2,590 Reputation points Microsoft External Staff
    2026-02-26T11:08:44.1333333+00:00

    Thanks for reaching out.
    CultureInfo.CurrentCulture.Name (or CurrentUICulture.Name) already returns the culture tag (e.g., zh-Hans-CN). If you want human-readable language names like “Chinese (Simplified)”, “English”, etc., use CultureInfo.EnglishName / DisplayName / NativeName.

    using System.Globalization;

    var ci = CultureInfo.CurrentUICulture;   // UI language in MAUI

    Console.WriteLine(ci.Name);              // "zh-Hans-CN"

    Console.WriteLine(ci.EnglishName);       // "Chinese (Simplified, China)"

    Console.WriteLine(ci.Parent.EnglishName);// "Chinese (Simplified)"

    To map a specific tag:

    var c = new CultureInfo("zh-Hans-CN");

    var language = c.Parent.EnglishName;     // "Chinese (Simplified)"

    And if you want to list/offer languages, enumerate cultures and read .Name + .EnglishName/.DisplayName (examples in Microsoft Learn). [CultureInf...soft Learn | Learn.Microsoft.com], [CultureTyp...soft Learn | Learn.Microsoft.com], [CultureInf...soft Learn | Learn.Microsoft.com], [CultureInf...soft Learn | Learn.Microsoft.com]

    Let me know if you need any further help with this. I will be happy to assist. If you find this helpful, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.


1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-26T04:25:45.2766667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    CultureInfo.CurrentCulture.Name already gives the BCP‑47 language tag (for example, en-US, zh-Hans-CN, fr-FR). From that CultureInfo instance, additional language information can be obtained from its properties.

    For the current culture:

    using System.Globalization;
    
    CultureInfo culture = CultureInfo.CurrentCulture;
    
    string languageTag   = culture.Name;        // e.g. "zh-Hans-CN"
    string englishName   = culture.EnglishName; // e.g. "Chinese (Simplified, China)"
    string nativeName    = culture.NativeName;  // e.g. "中文(简体,中国)"
    string displayName   = culture.DisplayName; // e.g. "Chinese (Simplified, China)"
    string twoLetterISO  = culture.TwoLetterISOLanguageName; // e.g. "zh"
    

    To get the names for all installed cultures (for example to build a list of Chinese Simplified, English, Japanese, etc.):

    using System.Globalization;
    
    CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
    
    foreach (var c in cultures)
    {
        Console.WriteLine($"Tag: {c.Name}, English: {c.EnglishName}, Native: {c.NativeName}");
    }
    

    EnglishName and NativeName provide readable names for each language/region, while Name gives the tag like zh-Hans-CN, en-US, ja-JP, de-DE, pt-BR, es-ES, fr-FR, ko-KR, ru-RU, it-IT, vi-VN, ar-SA, depending on what cultures are available on the platform.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.