Initial commit: ReminderOrganizer WPF app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
19
ViewModels/LocalizedStrings.cs
Normal file
19
ViewModels/LocalizedStrings.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#nullable enable
|
||||
using System.Windows;
|
||||
using ReminderOrganizer.Services;
|
||||
|
||||
namespace ReminderOrganizer.ViewModels
|
||||
{
|
||||
public class LocalizedStrings
|
||||
{
|
||||
private readonly ILocalizationService _localizationService;
|
||||
|
||||
public LocalizedStrings()
|
||||
{
|
||||
_localizationService = ServiceLocator.Services.GetService(typeof(ILocalizationService)) as ILocalizationService
|
||||
?? throw new System.InvalidOperationException("LocalizationService not found");
|
||||
}
|
||||
|
||||
public string this[string key] => _localizationService.GetString(key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user