title: Force culture in ASP.NET MVC WebApp
body: <p>I wish to force danish culture in my web application, but I can not get it work. I am trying to populate a dropdown list with danish country names, but they return in english.</p>
  
  <pre><code>public static IEnumerable&lt;SelectListItem&gt; GetCountries(string selectedDisplayName)
  {
      var countryNames = new List&lt;SelectListItem&gt;();
      foreach (var cul in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
      {
          var country = new RegionInfo(new CultureInfo(cul.Name, false).LCID);
          var item = new SelectListItem()
          {
              Text = country.DisplayName,
              Value = country.DisplayName
          };
          if (!String.IsNullOrEmpty(selectedDisplayName) &amp;&amp; country.DisplayName.Equals(selectedDisplayName))
          {
              item.Selected = true;
          }
          countryNames.Add(item);
      }
      IEnumerable&lt;SelectListItem&gt; nameAdded = countryNames.GroupBy(x =&gt; x.Text).Select(x =&gt; x.FirstOrDefault()).ToList().OrderBy(x =&gt; x.Text);
      return nameAdded;
  }
  </code></pre>
  
  <p>My web.config has this (with no effect):</p>
  
  <pre><code>&lt;system.web&gt;
      &lt;globalization uiCulture="da-DK" culture="da-DK" /&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>Anyone got any suggestions? </p>