gpt4 book ai didi

asp.net-boilerplate - 禁用本地化以仅支持英语作为默认语言。

转载 作者:行者123 更新时间:2023-12-02 17:15:13 25 4
gpt4 key购买 nike

我不想在 ASP.NET Boilerplate 中支持本地化,请告诉我如何禁用它(如果可能)。

最佳答案

  1. 注释掉 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. 如果您之前进行过播种,请从数据库的 AbpLanguages 表中删除条目。

  3. Account/_Layout.cshtml中注释掉这一行在登录前禁用语言选择:

    @*<vc:account-languages></vc:account-languages>*@
  4. Shared/_Layout.cshtml中注释掉这一行登录后禁用语言选择:

    @*@await Component.InvokeAsync(typeof(TopBarLanguageSwitchViewComponent))*@

关于asp.net-boilerplate - 禁用本地化以仅支持英语作为默认语言。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46758262/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com