title: How to Change CurrentCulture in ASP.net Core 3.1
body: <p>Multilingual App calls my APIs,i want to return messages,based on application language not based on app culture.So i decide to use Localization but Current Culture won't change with this code.
  Something like this :</p>
  <pre><code>[HttpPost(&quot;[action]/{languageid}&quot;)]
  public async Task&lt;IActionResult&gt; login([FromBody] AccountViewModel model, [FromRoute] int languageid)
  {
      var result = await signInManager.CheckPasswordSignInAsync(model.UserName, model.Password, true);
      CultureInfo cultureInfo;
      if(languageid == 1)
      {
          cultureInfo = new CultureInfo(&quot;fa-IR&quot;);
      }
      else
      {
          cultureInfo = new CultureInfo(&quot;en-US&quot;);
  
      }
      Thread.CurrentThread.CurrentCulture = cultureInfo;
      if (result)
          return Ok(new {Result = true , Message = _localize[&quot;Login-Success&quot;] });
  
      return Ok(new { Result = false, Message = _localize[&quot;Login-failed&quot;] });
  
  }
  </code></pre>
  <p>is there any better solution for returning multilingual message based on app language? i don't want save this message in my database.</p>