MvcLocalizationMvcBuilderExtensions.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(IMvcBuilder) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, Action<MvcDataAnnotationsLocalizationOptions>) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder, Action<LocalizationOptions>, LanguageViewLocationExpanderFormat, Action<MvcDataAnnotationsLocalizationOptions>) |
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación. |
AddMvcLocalization(IMvcBuilder)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
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
Parámetros
- builder
- IMvcBuilder
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(IMvcBuilder, LanguageViewLocationExpanderFormat)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
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
Parámetros
- builder
- IMvcBuilder
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(IMvcBuilder, Action<MvcDataAnnotationsLocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
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
Parámetros
- builder
- IMvcBuilder
- 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(IMvcBuilder, Action<LocalizationOptions>)
Agrega servicios de localización de anotaciones de datos y vistas de MVC a la aplicación.
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
Parámetros
- builder
- IMvcBuilder
- 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(IMvcBuilder, 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.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
Parámetros
- builder
- IMvcBuilder
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(IMvcBuilder, 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.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
Parámetros
- builder
- IMvcBuilder
- 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(IMvcBuilder, 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.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
Parámetros
- builder
- IMvcBuilder
- 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(IMvcBuilder, 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.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
Parámetros
- builder
- IMvcBuilder
- 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).