MvcLocalizationMvcCoreBuilderExtensions.AddViewLocalization Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
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
- builder
- IMvcCoreBuilder
The IMvcCoreBuilder.
Returns
The IMvcCoreBuilder.
Remarks
Adding localization also adds support for views via AddViews(IMvcCoreBuilder) and the Razor view engine via AddRazorViewEngine(IMvcCoreBuilder).
Applies to
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
- builder
- IMvcCoreBuilder
The IMvcCoreBuilder.
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
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
- builder
- IMvcCoreBuilder
The IMvcCoreBuilder.
- 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>)
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
- builder
- IMvcCoreBuilder
The IMvcCoreBuilder.
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).