开发者

Setting thread culture to default

In silverlight application I have MyTexts.resx (for english) and MyTexts.ja-JP.resx (for japanese) resource fi开发者_运维问答les. Before loading a page I can set current culture to japanese as following:

Thread.CurrentThread.CurrentCulture = new CultureInfo("ja-JP");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja-JP");

But sometimes I need to reset culture to default. How can I do that? The following wouldn't work:

Thread.CurrentThread.CurrentCulture = new CultureInfo("default");

OR

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");


I myself seem to find an answer:

Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜