Translation

This commit is contained in:
2025-07-31 15:02:46 +08:00
parent fd1c47196d
commit 6b1dda41bc
6 changed files with 70 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ using DysonNetwork.Shared.GeoIp;
using DysonNetwork.Sphere.WebReader;
using DysonNetwork.Sphere.Developer;
using DysonNetwork.Sphere.Discovery;
using DysonNetwork.Sphere.Translation;
namespace DysonNetwork.Sphere.Startup;
@@ -166,7 +167,15 @@ public static class ServiceCollectionExtensions
services.AddScoped<WebFeedService>();
services.AddScoped<DiscoveryService>();
services.AddScoped<CustomAppService>();
var translationProvider = configuration["Translation:Provider"]?.ToLower();
switch (translationProvider)
{
case "tencent":
services.AddScoped<ITranslationProvider, TencentTranslation>();
break;
}
return services;
}
}