🐛 Fix localization

This commit is contained in:
2025-05-08 23:04:21 +08:00
parent d70b081752
commit b370c69670
4 changed files with 8 additions and 37 deletions

View File

@ -64,12 +64,8 @@ builder.Services.Configure<RequestLocalizationOptions>(options => {
new CultureInfo("zh-hans"),
};
options.DefaultRequestCulture = new RequestCulture("en-us");
options.SupportedCultures = supportedCultures;
options.SupportedUICultures = supportedCultures;
// TODO parse user token
options.AddInitialRequestCultureProvider(new CustomRequestCultureProvider(async context => await Task.FromResult(new ProviderCultureResult("zh-hans"))));
});
// Other pipelines