I do not want localization support in ASP.NET Boilerplate, please let me know how can I disable it (if possible).
Asked
Active
Viewed 919 times
1 Answers
5
Comment out these lines in 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") }; }
If you have seeded before, remove the entries from the
AbpLanguages
table in the database.Comment out this line in Account/_Layout.cshtml to disable language selection before login:
@*<vc:account-languages></vc:account-languages>*@
Comment out this line in Shared/_Layout.cshtml to disable language selection after login:
@*@await Component.InvokeAsync(typeof(TopBarLanguageSwitchViewComponent))*@
![](../../users/profiles/8601760.webp)
aaron
- 17,311
- 4
- 27
- 63