mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-05 01:00:51 +08:00
修改可空类型
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Yi.Framework.WebCore.AspNetCoreExtensions
|
||||
|
||||
public static void UseLocalizerService(this IApplicationBuilder app)
|
||||
{
|
||||
Result._local = app.ApplicationServices.GetService<IStringLocalizer<LocalLanguage>>();
|
||||
Result._local = app.ApplicationServices.GetRequiredService<IStringLocalizer<LocalLanguage>>();
|
||||
|
||||
var support = new[] { "zh", "en" };
|
||||
var local = new RequestLocalizationOptions().SetDefaultCulture(support[0])
|
||||
|
||||
Reference in New Issue
Block a user