title: How to change language from ui from login page redirected automatically by cookie asp.net core
body: <p>I have set up automatic redirection to login page when unauthenticated in <code>Startup</code>:</p>
  <pre><code>services.ConfigureApplicationCookie(options =&gt;
  {
     options.LoginPath = &quot;/Authentication&quot;;
     options.SlidingExpiration = true;
  });
  </code></pre>
  <p>And I have set up form for language changing taken from <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-5.0#set-the-culture-programmatically" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-5.0#set-the-culture-programmatically</a>.</p>
  <p>How to make changing language on login page when unauthenticated?</p>