title: How to create a link to switch language in ASP.NET Core 2.2?
body: <p>A website supports several languages. The code to support multi-language including the routes are already in place and working.</p>
  
  <p>The localization is set up using the <code>RouteDataRequestCultureProvider</code> as explaned at <a href="https://joonasw.net/view/aspnet-core-localization-deep-dive" rel="nofollow noreferrer">https://joonasw.net/view/aspnet-core-localization-deep-dive</a>.</p>
  
  <pre><code>app.UseRouter(routes =&gt;
  {
      routes.MapMiddlewareRoute("{culture=en-US}/{*mvcRoute}", subApp =&gt;
      {
          subApp.UseRequestLocalization(localizationOptions);
  
          subApp.UseMvc(mvcRoutes =&gt;
          {
               // Routes are here
          }   
      });
  });
  </code></pre>
  
  <p>How to create a generic  tag which will show the current page in a different language? </p>
  
  <p>Ideally, I would just specify which language this link should point to and that it should keep all other route parameters (like the current controller, the current action, the current route model) so I can have this link in the <code>_Layout.cshtml</code>?</p>