A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
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.