title: Localized string from resource file
body: <p>I would like to add localized strings in my view.</p>
  
  <p><strong>Resources/Views.Account.Login.en-US.resx</strong></p>
  
  <p><a href="https://i.stack.imgur.com/x1ybT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x1ybT.png" alt="enter image description here"></a></p>
  
  <p><strong>Views/Account/Login.cshtml</strong></p>
  
  <pre><code>@using Microsoft.AspNetCore.Mvc.Localization    
  @inject IViewLocalizer Localizer
  
  &lt;div&gt;
      @System.Threading.Thread.CurrentThread.CurrentCulture.Name                   
      @System.Threading.Thread.CurrentThread.CurrentUICulture.Name
      @Localizer["Key"]
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Startup.cs</strong></p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddLocalization(options =&gt; options.ResourcesPath = "Resources");
  
      services.AddMvc()
          .AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
          .AddDataAnnotationsLocalization();
  }
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  {
  
      var options = new RequestLocalizationOptions
      {
          SupportedCultures = new List&lt;CultureInfo&gt;
          {
              new CultureInfo("en-US")
          },
          SupportedUICultures = new List&lt;CultureInfo&gt;
          {
              new CultureInfo("en-US")
          },
          DefaultRequestCulture = new RequestCulture("en-US")
      };
  
      app.UseRequestLocalization(options);
  }
  </code></pre>
  
  <p><strong>The generated HTML</strong></p>
  
  <pre><code>en-US
  en-US
  Key
  </code></pre>
  
  <p><strong>The expected HTML</strong></p>
  
  <pre><code>en-US
  en-US
  Hello
  </code></pre>
  
  <p>Have I forgotten a step?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>If the resources is named <code>Resources/Views.Account.Login.resx</code> is work correctly. Why ?</p>