mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00

This moves all language used in the installer to an embedded JSON file to allow for customisation per game.
13 lines
467 B
C#
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];
|
|
}
|
|
}
|