Add Phoenix remote desktop, action connector, documentation engine, and gamification support. Refactor support-case processing and search/action UI, and update installer assets and dependencies.
28 lines
814 B
C#
28 lines
814 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using System.Windows.Markup;
|
|
|
|
namespace FasdDesktopUi.Basics.Converter
|
|
{
|
|
[ValueConversion(typeof(string), typeof(XmlLanguage))]
|
|
internal class LanguageCultureConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (!(value is string tag))
|
|
return Binding.DoNothing;
|
|
|
|
return XmlLanguage.GetLanguage(tag);
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (!(value is XmlLanguage lang))
|
|
return Binding.DoNothing;
|
|
|
|
return lang.IetfLanguageTag;
|
|
}
|
|
}
|
|
}
|