title: Why does not work ASP.NET Core Localization
body: <p>I created an empty project.</p>
  
  <p><strong>Startup.cs</strong></p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddLocalization(s =&gt; s.ResourcesPath = "Resources");
      var supportedCultures = new CultureInfo[]
      {
          new CultureInfo("de-CH"),
          new CultureInfo("en-GB"),
      };
  
      services.Configure&lt;RequestLocalizationOptions&gt;(s =&gt;
      {
          s.SupportedCultures = supportedCultures;
          s.SupportedUICultures = supportedCultures;
          s.DefaultRequestCulture = new RequestCulture(culture: "de-CH", uiCulture: "de-CH");
      });
  
      services.AddMvc()
          .AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
          .AddDataAnnotationsLocalization();
  }
  
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
  
      app.UseStaticFiles();
  
      // Using localization 
      var locOptions = app.ApplicationServices.GetService&lt;IOptions&lt;RequestLocalizationOptions&gt;&gt;();
      app.UseRequestLocalization(locOptions.Value);
  
      app.UseMvc();
  }
  </code></pre>
  
  <p><strong>Folder Structure</strong></p>
  
  <pre><code>Resources
  |
  |--Controllers 
  |       HomeController.de.resx
  |       HomeController.en.resx
  |       HomeController.resx
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public class HomeController : Controller
  {
      private readonly IStringLocalizer&lt;HomeController&gt; _stringLocalizer;
  
      public HomeController(IStringLocalizer&lt;HomeController&gt; stringLocalizer)
      {
          _stringLocalizer = stringLocalizer;
      }
  
      public IActionResult Index()
      {
          string testValue = _stringLocalizer["Test"];
          return View();
      }
  }
  </code></pre>
  
  <p>I'm new about asp.net core, I'm just trying to understand, Why testValue always return Test, it's a bit confusing. I'm doing something wrong? i will be happy if u help me.</p>