ApplicationBuilderExtensions.UseRequestLocalization Method
Definition
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.
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)
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
The IApplicationBuilder.
Returns
The IApplicationBuilder.
Applies to
UseRequestLocalization(IApplicationBuilder, RequestLocalizationOptions)
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
The IApplicationBuilder.
- options
- RequestLocalizationOptions
The RequestLocalizationOptions to configure the middleware with.
Returns
The IApplicationBuilder.
Applies to
UseRequestLocalization(IApplicationBuilder, Action<RequestLocalizationOptions>)
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
The IApplicationBuilder.
- 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[])
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
The IApplicationBuilder.
- 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.