Open zdw2018 opened 11 months ago
I tried to use it in .NETCORE 8+hangfire 1.8.5 but it still shows English even though I set Chinese in start up. I even added culture=zh-CN to the request header, but it still doesn't work. My configuration is as follows:
services.AddHangfire(configuration => configuration .SetDataCompatibilityLevel(CompatibilityLevel.Version_180) .UseSimpleAssemblyNameTypeSerializer() .UseRecommendedSerializerSettings() .UseInMemoryStorage());
services.AddHangfireServer();
var supportedCultures = new string[] { "zh-CN" }; app.UseRequestLocalization(options => options .AddSupportedCultures(supportedCultures) .AddSupportedUICultures(supportedCultures) .SetDefaultCulture("zh-CN") .RequestCultureProviders.Insert(0, new CustomRequestCultureProvider(context => { return Task.FromResult(new ProviderCultureResult("zh-CN")); })) ); app.UseHangfireDashboard("/job");
look here: https://github.com/HangfireIO/Hangfire/issues/881
I tried to use it in .NETCORE 8+hangfire 1.8.5 but it still shows English even though I set Chinese in start up. I even added culture=zh-CN to the request header, but it still doesn't work. My configuration is as follows:
services.AddHangfireServer();