MvcLocalizationMvcBuilderExtensions.AddMvcLocalization Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
AddMvcLocalization(IMvcBuilder)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, format As LanguageViewLocationExpanderFormat) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
Format widoku dla zlokalizowanych widoków.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Akcja konfigurowania elementu MvcDataAnnotationsLocalizationOptions.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions)) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Akcja konfigurowania elementu LocalizationOptions.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, format As LanguageViewLocationExpanderFormat, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
Format widoku dla zlokalizowanych widoków.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Akcja konfigurowania elementu MvcDataAnnotationsLocalizationOptions.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), format As LanguageViewLocationExpanderFormat) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Akcja konfigurowania elementu LocalizationOptions.
Format widoku dla zlokalizowanych widoków.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Akcja konfigurowania elementu LocalizationOptions.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Akcja konfigurowania elementu MvcDataAnnotationsLocalizationOptions.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).
Dotyczy
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)
Dodaje do aplikacji usługi lokalizacyjne widok MVC i adnotacje danych.
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), format As LanguageViewLocationExpanderFormat, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcBuilder
Parametry
- builder
- IMvcBuilder
Element IMvcBuilder.
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Akcja konfigurowania elementu LocalizationOptions.
Może to być null
.
Format widoku dla zlokalizowanych widoków.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Akcja konfigurowania elementu MvcDataAnnotationsLocalizationOptions. Może to być null
.
Zwraca
Element IMvcBuilder.
Uwagi
Dodanie lokalizacji dodaje również obsługę widoków za pośrednictwem aparatu widoków Razor za pośrednictwem AddViews(IMvcCoreBuilder) polecenia AddRazorViewEngine(IMvcCoreBuilder).