MvcLocalizationMvcBuilderExtensions.AddViewLocalization 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddViewLocalization(IMvcBuilder) |
將 MVC 檢視當地語系化服務新增至應用程式。 |
AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat) |
將 MVC 檢視當地語系化服務新增至應用程式。 |
AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>) |
將 MVC 檢視當地語系化服務新增至應用程式。 |
AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>) |
將 MVC 檢視當地語系化服務新增至應用程式。 |
AddViewLocalization(IMvcBuilder)
將 MVC 檢視當地語系化服務新增至應用程式。
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcBuilder) As IMvcBuilder
參數
- builder
- IMvcBuilder
傳回
適用於
AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat)
將 MVC 檢視當地語系化服務新增至應用程式。
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcBuilder, format As LanguageViewLocationExpanderFormat) As IMvcBuilder
參數
- builder
- IMvcBuilder
當地語系化檢視的檢視格式。
傳回
適用於
AddViewLocalization(IMvcBuilder, Action<LocalizationOptions>)
將 MVC 檢視當地語系化服務新增至應用程式。
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions> setupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.Extensions.Localization.LocalizationOptions>? setupAction);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcBuilder, setupAction As Action(Of LocalizationOptions)) As IMvcBuilder
參數
- builder
- IMvcBuilder
- setupAction
- Action<LocalizationOptions>
設定 的 LocalizationOptions 動作。
傳回
適用於
AddViewLocalization(IMvcBuilder, LanguageViewLocationExpanderFormat, Action<LocalizationOptions>)
將 MVC 檢視當地語系化服務新增至應用程式。
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.Extensions.Localization.LocalizationOptions> setupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, Action<Microsoft.Extensions.Localization.LocalizationOptions>? setupAction);
static member AddViewLocalization : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat * Action<Microsoft.Extensions.Localization.LocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddViewLocalization (builder As IMvcBuilder, format As LanguageViewLocationExpanderFormat, setupAction As Action(Of LocalizationOptions)) As IMvcBuilder
參數
- builder
- IMvcBuilder
當地語系化檢視的檢視格式。
- setupAction
- Action<LocalizationOptions>
設定 的 LocalizationOptions 動作。