在silverlight应用程序中,我有MyTexts.resx(英文)和MyTexts.ja-JP.resx(日文)资源文件。在加载页面之前,我可以将当前文化设置为日语,如下所示:
Thread.CurrentThread.CurrentCulture = new CultureInfo("ja-JP");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja-JP");
但有时我需要将文化重置为默认值。我怎样才能做到这一点?以下方法无效:
Thread.CurrentThread.CurrentCulture = new CultureInfo("default");
OR
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
答案 0 :(得分:1)
我自己似乎找到了答案:
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;