Dela via


MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization Method

Definition

Overloads

AddViewLocalization(IMvcCoreBuilder)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

Adds MVC view localization services to the application.

AddViewLocalization(IMvcCoreBuilder)

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

Adds MVC view localization services to the application.

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

Parameters

Returns

The IMvcCoreBuilder.

Remarks

Adding localization also adds support for views via AddViews(IMvcCoreBuilder) and the Razor view engine via AddRazorViewEngine(IMvcCoreBuilder).

Applies to

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)

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

Adds MVC view localization services to the application.

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

Parameters

format
LanguageViewLocationExpanderFormat

The view format for localized views.

Returns

The IMvcCoreBuilder.

Remarks

Adding localization also adds support for views via AddViews(IMvcCoreBuilder) and the Razor view engine via AddRazorViewEngine(IMvcCoreBuilder).

Applies to

AddViewLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)

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

Adds MVC view localization services to the application.

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

Parameters

setupAction
Action<LocalizationOptions>

An action to configure the LocalizationOptions.

Returns

The IMvcCoreBuilder.

Remarks

Adding localization also adds support for views via AddViews(IMvcCoreBuilder) and the Razor view engine via AddRazorViewEngine(IMvcCoreBuilder).

Applies to

AddViewLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)

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

Adds MVC view localization services to the application.

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

Parameters

format
LanguageViewLocationExpanderFormat

The view format for localized views.

setupAction
Action<LocalizationOptions>

An action to configure the LocalizationOptions.

Returns

The IMvcCoreBuilder.

Remarks

Adding localization also adds support for views via AddViews(IMvcCoreBuilder) and the Razor view engine via AddRazorViewEngine(IMvcCoreBuilder).

Applies to