Bartvandee
Bartvandee

Reputation: 289

Visual Studio returns Dutch exceptions instead of English

I have been using Visual Studio on the same Windows machine for years now. Currently 2019 Today I started my computer and exceptions raised are now in Dutch where previously they were in English.

I would like them to be in English once again. I have tried the following posts:

But none of the above made a difference.

Hopefully someone can help me.

Upvotes: 1

Views: 1724

Answers (3)

Alex Z
Alex Z

Reputation: 11

Solution for win 11.

Start --> Settings --> Time & Language

--> set 'Preferred Language' to the language you need for the exception message

--> Reboot --> then change the keyboard-layout in/over the Taskbar.

Upvotes: 0

Galerion
Galerion

Reputation: 36

Maybe try this out: https://ifyoudo.net/post/2019/09/07/how-to-uninstall-a-net-language-pack-for-good

  1. Press Windows key + R
  2. Type: LPKSETUP
  3. Hit Enter
  4. Click Uninstall display languages
  5. Choose the language then click Next

Upvotes: 2

d4zed
d4zed

Reputation: 496

I'm not sure why the language changed all of the sudden, but you can configure the CurrentUICulture property to "en-US, then you will get english exceptions...

you can try to only change the language when handling exceptions, and then reset it:

CultureInfo previousCultureInfo = Thread.CurrentThread.CurrentCulture;

Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
try
{
  // do something
}
catch(Exception ex)
{
  // handling exception, writing to log or showing a message
}

Thread.CurrentThread.CurrentCulture = previousCultureInfo;
Thread.CurrentThread.CurrentUICulture = previousCultureInfo;

if this is done a lot, you might want to create a HandlingEnglishExceptionsClass or something.

Upvotes: 0

Related Questions