共用方式為


MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization 方法

定義

多載

AddViewLocalization(IMvcCoreBuilder)

將 MVC 檢視當地語系化服務新增至應用程式。

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

將 MVC 檢視當地語系化服務新增至應用程式。

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

將 MVC 檢視當地語系化服務新增至應用程式。

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

將 MVC 檢視當地語系化服務新增至應用程式。

AddViewLocalization(IMvcCoreBuilder)

來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
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) 的支援,以及透過 AddRazorViewEngine(IMvcCoreBuilder) 的 Razor 檢視引擎。

適用於

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
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) 的支援,以及透過 AddRazorViewEngine(IMvcCoreBuilder) 的 Razor 檢視引擎。

適用於

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
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) 的支援,以及透過 AddRazorViewEngine(IMvcCoreBuilder) 的 Razor 檢視引擎。

適用於

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
MvcLocalizationMvcCoreBuilderExtensions.cs
來源:
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) 的支援,以及透過 AddRazorViewEngine(IMvcCoreBuilder) 的 Razor 檢視引擎。

適用於