views:

577

answers:

4

In previous versions of VS.NET or the .NET framework, you got english exception messages by default. If you installed a 'language pack', you received exception messages in the language of that language pack.

Now, I'm working with an English VS.NET 2008 (no language packs have been installed) on a dutch Windows Vista.

When I'm developing, and I write some code that triggers an exception, the exception message that I receive, is in dutch (the language of my OS). I don't want it to be in dutch; I want it to be in English. (Reasons are obvious: easier to Google, and those translated error-messages are crap).

In VS.NET, my international settings are set to 'English', in Windows Vista, my regional settings are set to 'Dutch/Belgium'. How can I get English exception messages, without having to change anything to my regional settings in Windows?

A: 

It is (most likely) because you have a Dutch NetFX installed.

veggerby
as far as i know, there exists no localized dutch DotNetFx.Just to be sure: do you know of a way how I can verify whether I've a dutch or english one ?
Frederik Gheysels
+7  A: 

After some searching on Stackoverflow and other sites on the net, it seems that Windows Vista decides which language-packs should be installed, and there seem to be no way to uninstall those language-packages (in XP this was possible).

I do not have Vista Ultimate (which would allow you to install multiple language packs side by side).

So, what I've done now, is this:

I've created a custom conditional compile symbol (DEVELOPER), and in my application, I've this code:

#if DEVELOPER

Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-us");

#endif

I just need to make sure that, when I build my application for deployment, I do not include this conditional define ... (But, I can easily do this, since my application is under CI).

Frederik Gheysels
hmm you know this might just fix an issue I had too, thanks for posting this :)
Zeus
A: 

Thread.CurrentThread.CurrentUICulture is based on the language of your installed OS. So installing an English version of your OS is your only option.

Or like you stated setting Thread.CurrentThread.CurrentUICulture to "en-Us" within each application you code whitch seems to my quite 'quite awkward'.

Mez
It is indeed awkward, and nothing more then a workaround. Re-installing my OS is no option.
Frederik Gheysels
A: 

there are language packs available for .Net Framework for almost every language.

Take a look at what you find under installed software and uninstall this language pack. This will cause that the VS2008 will bring error messages etc. in English.

Thomasek
AFAIK, this was true for previous versions of .NET. Check my question, where i've mentionned this.
Frederik Gheysels