85

I'm currently working in another country, and my PC has a non-English version of Windows installed. I don't care about this, but I do care a lot when Visual Studio shows error messages because they are also localized to the same language as Windows.

Sometimes I spend a good time trying to find what it means, which is pretty boring...

Is there any way to configure Windows or Visual Studio to display the messages in English?

Melebius
  • 6,183
  • 4
  • 39
  • 52

9 Answers9

26

Deinstall the .NET Framework xxx Language Pack. (xxx = boring message language)

  • 7
    Doesn't work for me (Windows 7 édition familiale premium), in Add/Remove programs, I don't have any .NET Framework xxx Language Pack. – Suzanne Soy Apr 27 '13 at 17:34
  • @GeorgesDupéron mb you have multi targeting pack, that's also include localizations. Try to uninstall it too. – Johnny_D Aug 27 '13 at 12:58
  • 6
    @Johnny_D Uninstalling that actually removed entierly the .NET Framework v4, so all my projects stopped working. Not a good idea :) . – Suzanne Soy Aug 28 '13 at 12:30
  • 2
    @GeorgesDupéron It it really not good idea, I just broke my entire OS. Seems that to reinstall .net framework back I have to reinstall whole. Lots of errors while installing, lots of errors in eventvwr. System restore is also useless. Pity story. – Johnny_D Aug 28 '13 at 13:11
  • 6y old answer still did the trick... I was getting so frustrated with localized error messages i could cry. Thanks from the future in the past! – DerpyNerd Dec 01 '15 at 12:46
  • 4
    For `.NET 4.6.2` you need to uninstall `Microsoft .NET Framework 4.6.2 (boring language)`. Make sure that you still have installed `Microsoft .NET Framework 4.6.2` – Fabio Nov 27 '16 at 08:27
  • Does not work for Visual Studio compiler errors in Qt Creator (C++). – Melebius Nov 07 '17 at 08:01
  • Could you provide the steps to do so ? – Julien Aug 12 '22 at 07:36
25

The best way would be to use this code in your application entry method

if (Debugger.IsAttached)
    CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo("en-US");

It will force english messages not only in exceptions caught and displayed in the application but inside the IDE as well

Because you cannot force your users to use english language versions of Windows when performing some initial tests on premises you may have find this useful.

Community
  • 1
  • 1
Peuczynski
  • 4,591
  • 1
  • 19
  • 33
  • At least it works... But well... If I need non-english datetime format? – NoWar Jan 24 '18 at 08:31
  • @AcademyofProgrammer you can either explicitly provide the format or override the dateformats in CultureInflo like this https://stackoverflow.com/questions/1389187/set-default-datetime-format-c-sharp – Peuczynski Jan 24 '18 at 09:23
  • 1
    @Peuczyński Yeah I know... The problem is that all .NET errors are discussed well in English only. So once you try to find answer using native error message you cannot. Hahaha. Thats why my unique motive to see errors in english. Cheers, dude! :) – NoWar Jan 25 '18 at 01:17
  • This just adds lots of date-format issues even if you override it as linked above (you can only add one shortdate variant even though there are many. Just play around with DateTime.Parse() afterwards with the diff variants of day month year). – Wolf5 Jan 17 '19 at 09:51
12

Under Tools/Options/International settings. I have an option to change the language from "Same as Microsoft Windows" to "English" (Visual Studio 2008 in case it makes any difference). If you don't have English in there then I'm not sure how you add more languages...


Edited to add:

Since you are talking about application exceptions you need to change the culture of the application you are dubugging, you can do that by following this or if it isn't an option to change the culture for the whole app this question has some ideas for only changing culture when exceptions are thrown.

Community
  • 1
  • 1
Martin Harris
  • 28,277
  • 7
  • 90
  • 101
  • Are you referring to error messages that Visual Studio itself uses, or exceptions thrown by an application you are debugging? If it is in your application then exceptions will be thrown in the culture that the application is in, not Visual Studio. – Martin Harris May 12 '09 at 12:53
  • Didn't make a difference in VS2017 – alansiqueira27 Oct 02 '18 at 13:35
10

As I posted in another thread, in my case it took only one line of code to change the Culture:

System.Globalization.CultureInfo.DefaultThreadCurrentUICulture=System.Globalization.CultureInfo.GetCultureInfo("en-US");

It changes default Culture of Main thread and new ones as well.

Black
  • 18,150
  • 39
  • 158
  • 271
Hefass
  • 161
  • 2
  • 8
  • doesn't work for me. @edit...CurrentUICulture is changed later on in my code depending on user settings. Not a solution if you need to display different langauges. – Malako Feb 07 '19 at 12:51
0

I didn't have any .NET Framework Language Packs installed. I think the problem was that the IIS was not in English due to the whole system wasn't in English.

I installed Windows English Language Pack and changed the OS-Language to English. Now everything's fine.

If you're on Windows 7 Professional, this may help you.

flygge
  • 189
  • 2
  • 11
0

As Martin Harris sugested above, at the beginning the Options window didn't have the English language for me, so I had to install it trought the Visual Studio Installer2. After that, yo should be able to see the Options window with the english option enabled1, and you can finally choose it.

Best Regards.

  • Please note that if you haven't updated your visual studio, it is probably going to tell you to update yours before add some package or tool. Once you have done it, you can install the language packages. – Luis Veliz Jul 23 '19 at 00:06
0

In my case in Windows 10 it was as simple as going to Language Settings in Windows and changing the windows display language.

I could have tried changing the DefaultThreadCurrentUICulture as described above in code but i feel this is wrong for multilanguage apps and really exception messages should stay in english so someone can google them and get help.

T M
  • 999
  • 1
  • 8
  • 13
0

I didn't have any language packs in Visual Studio / Windows installed other than English. Still my application in IIS Manager > .NET Globalization > (UI) Culture showed another language than English. Running lpksetup in a cmd-window I was able to uninstall the language pack (Dutch in my case).

source: https://blogs.msdn.microsoft.com/benjaminperkins/2013/03/01/creating-custom-language-specific-error-pages-in-iis/

andy
  • 531
  • 5
  • 16
-1

1 . Deinstall the .net framework 2. go to preferences languages => region and languages => change language to your language that u want (windows 10)

  • this method its work for me
MOHAMED
  • 13
  • 5