C# ASP.NET MVC:本地化问题(区域性的错误resx文件)

C# ASP.NET MVC:本地化问题(区域性的错误resx文件),c#,asp.net-mvc,localization,C#,Asp.net Mvc,Localization,我有一个Strings.resx和一个Strings.nl.resx文件。 第一个包含英语字符串,另一个包含荷兰语字符串。它们是C#类库项目:模块的一部分 public static string testString() { //I Force the culture to always be english Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("

我有一个
Strings.resx
和一个
Strings.nl.resx
文件。 第一个包含英语字符串,另一个包含荷兰语字符串。它们是
C#类库
项目:
模块
的一部分

 public static string testString()
 {          
      //I Force the culture to always be english
       Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
       Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
       return Strings.Hello;
 }
当我从一个简单的
控制台应用程序
调用它们时,它可以工作:

  Console.WriteLine(Module.testString()); //English string gets returned
当我从我的
ASP.NETMVC
应用程序中执行相同操作时,我得到了荷兰语版本

    public ActionResult testCulture()
    {
        return Content(Module.testString()); //Dutch string gets returned..?!
    }
我使用的是荷兰语窗口,所以任何自动设置都是荷兰语。但是,当文化在类库中硬编码为en-us时,我如何获得不同的字符串


我错过了什么

您是否在任何地方指定了中性资源语言?如果将其设置为
“nl”
“nl nl”
,则任何未找到的资源请求最终都将获取
“nl”
资源。由于您没有
Strings.en-US.resx
Strings.en.resx
,因此将
CurrentUICulture
设置为
“en-US”
将使系统使用中性资源语言。

检查您的web.config是否没有将语言设置为荷兰语的全球化标记

如果您使用的是internet explorer,请转到“工具”>“internet选项”,然后单击“语言”按钮。如果在显示英语之前显示荷兰语,请将其更改