MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization 方法

定义

重载

AddViewLocalization(IMvcCoreBuilder)

将 MVC 视图本地化服务添加到应用程序。

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

将 MVC 视图本地化服务添加到应用程序。

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

将 MVC 视图本地化服务添加到应用程序。

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

将 MVC 视图本地化服务添加到应用程序。

AddViewLocalization(IMvcCoreBuilder)

Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs

将 MVC 视图本地化服务添加到应用程序。

public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcCoreBuilder) As IMvcCoreBuilder

参数

返回

IMvcCoreBuilder

注解

添加本地化还会通过 AddViews(IMvcCoreBuilder) 添加对视图的支持,并通过 添加对 Razor 视图引擎的支持 AddRazorViewEngine(IMvcCoreBuilder)

适用于

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs

将 MVC 视图本地化服务添加到应用程序。

public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcCoreBuilder, format As LanguageViewLocationExpanderFormat) As IMvcCoreBuilder

参数

format
LanguageViewLocationExpanderFormat

本地化视图的视图格式。

返回

IMvcCoreBuilder

注解

添加本地化还会通过 AddViews(IMvcCoreBuilder) 添加对视图的支持,并通过 添加对 Razor 视图引擎的支持 AddRazorViewEngine(IMvcCoreBuilder)

适用于

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs

将 MVC 视图本地化服务添加到应用程序。

public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> setupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? setupAction);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcCoreBuilder, setupAction As Action(Of LocalizationOptions)) As IMvcCoreBuilder

参数

setupAction
Action<LocalizationOptions>

用于配置 的操作 LocalizationOptions

返回

IMvcCoreBuilder

注解

添加本地化还会通过 AddViews(IMvcCoreBuilder) 添加对视图的支持,并通过 添加对 Razor 视图引擎的支持 AddRazorViewEngine(IMvcCoreBuilder)

适用于

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs
Source:
MvcLocalizationMvcCoreBuilderExtensions.cs

将 MVC 视图本地化服务添加到应用程序。

public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.Extensions.Localization.LocalizationOptions> setupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.Extensions.Localization.LocalizationOptions>? setupAction);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcCoreBuilder, format As LanguageViewLocationExpanderFormat, setupAction As Action(Of LocalizationOptions)) As IMvcCoreBuilder

参数

format
LanguageViewLocationExpanderFormat

本地化视图的视图格式。

setupAction
Action<LocalizationOptions>

用于配置 的操作 LocalizationOptions

返回

IMvcCoreBuilder

注解

添加本地化还会通过 AddViews(IMvcCoreBuilder) 添加对视图的支持,并通过 添加对 Razor 视图引擎的支持 AddRazorViewEngine(IMvcCoreBuilder)

适用于