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