我不希望ASP.NET Boilerplate中的本地化支持,请告诉我如何禁用它(如果可能的话)。
答案 0 :(得分:3)
在DefaultLanguagesCreator.cs中注释掉这些行:
private static List<ApplicationLanguage> GetInitialLanguages()
{
return new List<ApplicationLanguage>
{
new ApplicationLanguage(null, "en", "English", "famfamfam-flags gb"),
// new ApplicationLanguage(null, "ar", "العربية", "famfamfam-flags sa"),
// new ApplicationLanguage(null, "de", "German", "famfamfam-flags de"),
// new ApplicationLanguage(null, "it", "Italiano", "famfamfam-flags it"),
// new ApplicationLanguage(null, "fr", "Français", "famfamfam-flags fr"),
// new ApplicationLanguage(null, "pt-BR", "Portuguese", "famfamfam-flags br"),
// new ApplicationLanguage(null, "tr", "Türkçe", "famfamfam-flags tr"),
// new ApplicationLanguage(null, "ru", "Русский", "famfamfam-flags ru"),
// new ApplicationLanguage(null, "zh-CN", "简体中文", "famfamfam-flags cn"),
// new ApplicationLanguage(null, "es-MX", "Español México", "famfamfam-flags mx"),
// new ApplicationLanguage(null, "ja", "日本語", "famfamfam-flags jp")
};
}
如果您之前播种过,请从数据库中的AbpLanguages
表中删除条目。
在Account/_Layout.cshtml中注释掉此行以在登录前禁用语言选择:
@*<vc:account-languages></vc:account-languages>*@
在Shared/_Layout.cshtml中注释掉此行以在登录后禁用语言选择:
@*@await Component.InvokeAsync(typeof(TopBarLanguageSwitchViewComponent))*@