I have my ASP.NET Core 8 project that references to external project that contains the following controller:
public class AccountController
{
[HttpGet]
[AllowAnonymous]
public async Task<IActionResult> Login(string returnUrl = null)
{
...
}
[HttpGet]
[AllowAnonymous]
public async Task<IActionResult> ChangePassword(string returnUrl = null)
{
...
}
}
where:
- AccountController.Login is mapped to route /Login
- AccountController.ChangePassword is mapped to route /ChangePassword
I would like to replace these routes within the Startup.cs of my ASP.NET Core 8 project, so that the routes support multiple cultures as follows:
AccountController.Login -> /en/login, /it/login
AccountController.ChangePassword -> /en/change-password, /it/cambia-password
Could someone provide guidance or an example on how to configure this in the Startup.cs file?
DotCat1985 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.