ApplicationBuilderExtensions.UseRequestLocalization Method

Definition

Overloads

UseRequestLocalization(IApplicationBuilder)

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

UseRequestLocalization(IApplicationBuilder, RequestLocalizationOptions)

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

UseRequestLocalization(IApplicationBuilder, Action<RequestLocalizationOptions>)

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

UseRequestLocalization(IApplicationBuilder, String[])

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

UseRequestLocalization(IApplicationBuilder)

Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRequestLocalization(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseRequestLocalization : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRequestLocalization (app As IApplicationBuilder) As IApplicationBuilder

Parameters

Returns

The IApplicationBuilder.

Applies to

UseRequestLocalization(IApplicationBuilder, RequestLocalizationOptions)

Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRequestLocalization(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::RequestLocalizationOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.RequestLocalizationOptions options);
static member UseRequestLocalization : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.RequestLocalizationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRequestLocalization (app As IApplicationBuilder, options As RequestLocalizationOptions) As IApplicationBuilder

Parameters

options
RequestLocalizationOptions

The RequestLocalizationOptions to configure the middleware with.

Returns

The IApplicationBuilder.

Applies to

UseRequestLocalization(IApplicationBuilder, Action<RequestLocalizationOptions>)

Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRequestLocalization(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Builder::RequestLocalizationOptions ^> ^ optionsAction);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Builder.RequestLocalizationOptions> optionsAction);
static member UseRequestLocalization : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Builder.RequestLocalizationOptions> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRequestLocalization (app As IApplicationBuilder, optionsAction As Action(Of RequestLocalizationOptions)) As IApplicationBuilder

Parameters

optionsAction
Action<RequestLocalizationOptions>

A callback that configures the RequestLocalizationOptions.

Returns

The IApplicationBuilder.

Remarks

This will going to instantiate a new RequestLocalizationOptions that doesn't come from the services.

Applies to

UseRequestLocalization(IApplicationBuilder, String[])

Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs
Source:
ApplicationBuilderExtensions.cs

Adds the RequestLocalizationMiddleware to automatically set culture information for requests based on information provided by the client.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseRequestLocalization(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, ... cli::array <System::String ^> ^ cultures);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, params string[] cultures);
static member UseRequestLocalization : Microsoft.AspNetCore.Builder.IApplicationBuilder * string[] -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseRequestLocalization (app As IApplicationBuilder, ParamArray cultures As String()) As IApplicationBuilder

Parameters

cultures
String[]

The culture names to be added by the application, which is represents both supported cultures and UI cultures.

Returns

The IApplicationBuilder.

Remarks

Note that the first culture is the default culture name.

Applies to