I am working on a small web application (Razor Pages) and I have added localization to it. The problem I have now is the following:
When application loads first time or when user presses home button (<a href="/"</a>), the url in the browser is this:
https://localhost/
and when I press a link (<a asp-page="/login"></a>) it navigates me to https://localhost/login instead of https://localhost/{currentCulture}/login
and for this reason, I want to it to be something like this:
https://localhost/{currentCulture}/
For example, for english --> https://localhost/en/
I have already set default current culture and it is applied when application starts but it is not written in the url.
I have followed this tutorial to add localization to my app : http://www.ziyad.info/en/articles/10-Developing_Multicultural_Web_Application
Update:
When User presses home button I did this:<a href="/@CultureInfo.CurrentCulture.Name"></a> and it works.