feat(i18n): add WPF localization primitives and Language config to installer

This commit is contained in:
mika kuns
2026-06-03 12:45:49 +02:00
parent 350a89f364
commit 2fbf054a57
4 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using System.ComponentModel;
using ClaudeDo.Localization;
namespace ClaudeDo.Installer.Localization;
public sealed class LocalizedString : INotifyPropertyChanged
{
private readonly ILocalizer _localizer;
private readonly string _key;
public LocalizedString(ILocalizer localizer, string key)
{
_localizer = localizer;
_key = key;
_localizer.LanguageChanged += (_, _) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Value)));
}
public string Value => _localizer[_key];
public event PropertyChangedEventHandler? PropertyChanged;
}