25 lines
553 B
C#
25 lines
553 B
C#
using System;
|
|
using System.Windows.Markup;
|
|
using BS.SharedLauncher.Translation;
|
|
|
|
namespace BeWoLauncher.MultiLanguage.Markup
|
|
{
|
|
[MarkupExtensionReturnType]
|
|
public class TranslateExtension : MarkupExtension
|
|
{
|
|
private readonly String key;
|
|
|
|
public TranslateExtension() { }
|
|
|
|
public TranslateExtension(String key)
|
|
{
|
|
this.key = key;
|
|
}
|
|
|
|
public override Object ProvideValue(IServiceProvider serviceProvider)
|
|
{
|
|
return Translator.Translate(this.key);
|
|
}
|
|
}
|
|
}
|