共用方式為


ApplicationBuilderExtensions.UseRequestLocalization 方法

定義

多載

UseRequestLocalization(IApplicationBuilder)

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

UseRequestLocalization(IApplicationBuilder, RequestLocalizationOptions)

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

UseRequestLocalization(IApplicationBuilder, Action<RequestLocalizationOptions>)

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

UseRequestLocalization(IApplicationBuilder, String[])

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

UseRequestLocalization(IApplicationBuilder)

來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

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

參數

傳回

IApplicationBuilder

適用於

UseRequestLocalization(IApplicationBuilder, RequestLocalizationOptions)

來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

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

參數

options
RequestLocalizationOptions

RequestLocalizationOptions 設定中介軟體的 。

傳回

IApplicationBuilder

適用於

UseRequestLocalization(IApplicationBuilder, Action<RequestLocalizationOptions>)

來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

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

參數

optionsAction
Action<RequestLocalizationOptions>

設定 的 RequestLocalizationOptions 回呼。

傳回

IApplicationBuilder

備註

這會具現化不是來自服務的新 RequestLocalizationOptions

適用於

UseRequestLocalization(IApplicationBuilder, String[])

來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs
來源:
ApplicationBuilderExtensions.cs

新增 以 RequestLocalizationMiddleware 根據用戶端提供的資訊自動設定要求的文化特性資訊。

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

參數

cultures
String[]

應用程式要新增的文化特性名稱,這代表支援的文化特性和 UI 文化特性。

傳回

IApplicationBuilder

備註

請注意,第一個文化特性是預設文化特性名稱。

適用於