mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-09-05 20:21:24 +12:00
26 lines
633 B
C#
26 lines
633 B
C#
|
// <copyright file="Translate.cs" company="PlaceholderCompany">
|
|||
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|||
|
// </copyright>
|
|||
|
//
|
|||
|
// Copyright (c) 2022-2022 Peter Kirmeier
|
|||
|
|
|||
|
#nullable enable
|
|||
|
|
|||
|
namespace SystemTrayMenu.Utilities
|
|||
|
{
|
|||
|
using System;
|
|||
|
using System.Windows.Markup;
|
|||
|
|
|||
|
public class Translate : MarkupExtension
|
|||
|
{
|
|||
|
private readonly string original;
|
|||
|
|
|||
|
public Translate(string original)
|
|||
|
{
|
|||
|
this.original = original;
|
|||
|
}
|
|||
|
|
|||
|
public override object ProvideValue(IServiceProvider serviceProvider) => Translator.GetText(original);
|
|||
|
}
|
|||
|
}
|