chore fix

This commit is contained in:
2025-12-06 13:30:17 +08:00
parent 2972886576
commit 8aca372fc1
43 changed files with 984 additions and 595 deletions

View File

@@ -0,0 +1,27 @@
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);
}
}
}