TRX/tools/installer/TRX_InstallerLib/Utils/ConditionalViewTextConverter.cs
lahm86 365cff79c1 tools/installer: move language to external file
This moves all language used in the installer to an embedded JSON file
to allow for customisation per game.
2025-03-30 12:34:54 +01:00

13 lines
467 B
C#

using System.Globalization;
using TRX_InstallerLib.Models;
namespace TRX_InstallerLib.Utils;
public class ConditionalViewTextConverter : ConditionalMarkupConverter
{
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string result = base.Convert(value, targetType, parameter, culture).ToString()!;
return result.Length == 0 ? string.Empty : Language.Instance.Controls![result];
}
}