using Microsoft.Extensions.Localization;

namespace OneForMe.Services;

public class LocalizationService
{
    private readonly IStringLocalizer _localizer;

    public LocalizationService(IStringLocalizerFactory factory)
    {
        _localizer = factory.Create("SharedResources", "OneForMe");
    }

    public string Get(string key) => _localizer[key];

    public string this[string key] => _localizer[key];
    public string this[string key, params object[] args] => _localizer[key, args];
}