2

I do not want localization support in ASP.NET Boilerplate, please let me know how can I disable it (if possible).

1 Answers1

5
  1. 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")
        };
    }
    
  2. If you have seeded before, remove the entries from the AbpLanguages table in the database.

  3. Comment out this line in Account/_Layout.cshtml to disable language selection before login:

    @*<vc:account-languages></vc:account-languages>*@
    
  4. Comment out this line in Shared/_Layout.cshtml to disable language selection after login:

    @*@await Component.InvokeAsync(typeof(TopBarLanguageSwitchViewComponent))*@
    
aaron
  • 17,311
  • 4
  • 27
  • 63