chore fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user