Initial commit

This commit is contained in:
2026-08-22 19:11:00 +03:00 Unverified
commit db368674d4
74 changed files with 2739 additions and 0 deletions
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.UI.Xaml.Data;
namespace WinWARP.Ui.Converters;
public class LanguageCodeToNameConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is string languageCode && !string.IsNullOrWhiteSpace(languageCode))
{
try
{
CultureInfo culture = new CultureInfo(languageCode);
// DisplayName returns "English (United States)"
// NativeName returns "English (United States)" or "Español (España)"
return culture.NativeName;
}
catch (CultureNotFoundException)
{
return value;
}
}
return string.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}