using Microsoft.Extensions.Localization; using System.Net.Http; namespace Atomx.Admin.Client.Services { public class JsonStringLocalizerFactory : IStringLocalizerFactory { private readonly string _resourcesPath; private readonly HttpClient _httpClient; public JsonStringLocalizerFactory(string resourcesPath, HttpClient httpClient) { _resourcesPath = (resourcesPath ?? "Localization").Trim('/'); _httpClient = httpClient; } public IStringLocalizer Create(Type resourceSource) { return new JsonStringLocalizer(_resourcesPath, _httpClient); } public IStringLocalizer Create(string baseName, string location) { return new JsonStringLocalizer(_resourcesPath, _httpClient); } } }