MvcLocalizationMvcBuilderExtensions.AddViewLocalization 方法

定义

重载

AddViewLocalization(IMvcBuilder)

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

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)

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

AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>)

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

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

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

AddViewLocalization(IMvcBuilder)

Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs

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

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

参数

返回

IMvcBuilder

适用于

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)

Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs

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

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

参数

format
LanguageViewLocationExpanderFormat

本地化视图的视图格式。

返回

IMvcBuilder

适用于

AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>)

Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs

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

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

参数

setupAction
Action<LocalizationOptions>

用于配置 的操作 LocalizationOptions

返回

IMvcBuilder

适用于

AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs
Source:
MvcLocalizationMvcBuilderExtensions.cs

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

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

参数

format
LanguageViewLocationExpanderFormat

本地化视图的视图格式。

setupAction
Action<LocalizationOptions>

用于配置 的操作 LocalizationOptions

返回

IMvcBuilder

适用于