locked
ASP.NET core 2.1 - How to localize identity url RRS feed

  • Question

  • I am creating a new ASP.NET core 2.1 project and I have created a route to include the language code at the beginning (Website.com/en/Home/Index).

    app.UseRouter(routes =>
            {
                routes.MapMiddlewareRoute("{culture=" + DefaultCultures + "}/{*mvcRoute}", subApp =>
                 {
                     subApp.UseRequestLocalization(localizationOptions);
    
                     mvcRoutes.MapRoute(
                         name: "default",
                         template: "{culture=" + DefaultCultures + "}/{controller=Home}/{action=Index}/{id?}"
                     });
                 });
            });

    I have scaffolded the Identity code into my project and it created the Identity Area making the Login Url Website.com/Identity/Account/Login.

    I would like to know if it's possible to make the route the same with the language code? Preferably Website.com/en/Account/Login but if that's not possible Website.com/en/Identity/Account/Login would work.

    Thanks!

    • Moved by CoolDadTx Wednesday, August 22, 2018 3:25 PM ASP.NET related
    Wednesday, August 22, 2018 1:39 AM

All replies

  • ASP.NET Core MVC can be discussed at the Core forum at ASP.NET forums.

    http://forums.asp.net/

    Wednesday, August 22, 2018 4:40 AM