开发者

Change Windows Locale / Culture without using code

开发者 https://www.devze.com 2023-01-29 07:04 出处:网络
This ought to be simple and it probably is but I can\'t seem to find an answer t开发者_如何学JAVAo this question...

This ought to be simple and it probably is but I can't seem to find an answer t开发者_如何学JAVAo this question...

I am developing C# application using Visual Studio 2008 and the application supports a number of different languages. To test different languages on the development machine is simple (e.g. temporarily adding Thread.CurrentThread.CurrentUICulture = new CultureInfo("sv") to the application will let me test the Swedish translation) but how can I change the Locale / Culture on a test machine without using code? I want to use the following steps for my tests :

  1. Install Windows on test machine (English version).
  2. Install application on test machine.
  3. Run tests using English.
  4. Change Locale / Culture on test machine to Swedish.
  5. Repeat tests using Swedish.
  6. Repeat for every language the market division might think of;)


From the start menu, run intl.cpl. .NET initialized from GetUserDefaultUILanguage, which returns something different than the installation language only if you have MUI packs installed, see Microsoft's overview article.

0

精彩评论

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

关注公众号