2022-10-23 11:02:31 +13:00
|
|
|
|
// <copyright file="Translate.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2022-2022 Peter Kirmeier
|
|
|
|
|
|
|
|
|
|
namespace SystemTrayMenu.Utilities
|
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Markup;
|
|
|
|
|
|
|
|
|
|
public class Translate : MarkupExtension
|
|
|
|
|
{
|
|
|
|
|
private readonly string original;
|
|
|
|
|
|
|
|
|
|
public Translate(string original)
|
|
|
|
|
{
|
|
|
|
|
this.original = original;
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-04 10:41:03 +13:00
|
|
|
|
public override object ProvideValue(IServiceProvider serviceProvider) => Translator.GetText(original);
|
2022-10-23 11:02:31 +13:00
|
|
|
|
}
|
|
|
|
|
}
|