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 :
- Install Windows on test machine (English version).
- Install application on test machine.
- Run tests using English.
- Change Locale / Culture on test machine to Swedish.
- Repeat tests using Swedish.
- 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.
精彩评论