MvcLocalizationMvcCoreBuilderExtensions.AddMvcLocalization Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
AddMvcLocalization(IMvcCoreBuilder)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, format As LanguageViewLocationExpanderFormat) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
Formato de vista para vistas localizadas.
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Acción para configurar .MvcDataAnnotationsLocalizationOptions
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions)) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Acción para configurar .LocalizationOptions
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, format As LanguageViewLocationExpanderFormat, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
Formato de vista para vistas localizadas.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Acción para configurar .MvcDataAnnotationsLocalizationOptions
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), format As LanguageViewLocationExpanderFormat) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Acción para configurar .LocalizationOptions
Formato de vista para vistas localizadas.
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> localizationOptionsSetupAction, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> dataAnnotationsLocalizationOptionsSetupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? localizationOptionsSetupAction, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? dataAnnotationsLocalizationOptionsSetupAction);
static member AddMvcLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Acción para configurar .LocalizationOptions
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Acción para configurar .MvcDataAnnotationsLocalizationOptions
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).
Se aplica a
AddMvcLocalization(IMvcCoreBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder 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.IMvcCoreBuilder AddMvcLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder 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.IMvcCoreBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddMvcLocalization (builder As IMvcCoreBuilder, localizationOptionsSetupAction As Action(Of LocalizationOptions), format As LanguageViewLocationExpanderFormat, dataAnnotationsLocalizationOptionsSetupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcCoreBuilder
Parámetros
- builder
- IMvcCoreBuilder
- localizationOptionsSetupAction
- Action<LocalizationOptions>
Acción para configurar .LocalizationOptions Puede ser null
.
Formato de vista para vistas localizadas.
- dataAnnotationsLocalizationOptionsSetupAction
- Action<MvcDataAnnotationsLocalizationOptions>
Acción para configurar .MvcDataAnnotationsLocalizationOptions Puede ser null
.
Devoluciones
Comentarios
Agregar localización también agrega compatibilidad con las vistas a través AddViews(IMvcCoreBuilder) de y el motor de vistas de Razor a través de AddRazorViewEngine(IMvcCoreBuilder).