Configure Visual Studio to show error messages in English
Asked Answered
T

9

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?

Terminate answered 12/5, 2009 at 12:43 Comment(2)
Aren't you able to configure that on install? If you have the option, try re-installing VS.Clerihew
visual studio is the english version, but exception messages are not...Terminate
C
27

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

Cerellia answered 29/5, 2009 at 8:28 Comment(8)
Doesn't work for me (Windows 7 édition familiale premium), in Add/Remove programs, I don't have any .NET Framework xxx Language Pack.Lamond
@GeorgesDupéron mb you have multi targeting pack, that's also include localizations. Try to uninstall it too.Pownall
@Pownall Uninstalling that actually removed entierly the .NET Framework v4, so all my projects stopped working. Not a good idea :) .Lamond
@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.Pownall
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!Bosom
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.2Thomasinathomasine
Does not work for Visual Studio compiler errors in Qt Creator (C++).Lysimachus
Could you provide the steps to do so ?Cimabue
K
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.

Kingly answered 31/3, 2016 at 12:44 Comment(4)
At least it works... But well... If I need non-english datetime format?Receptacle
@AcademyofProgrammer you can either explicitly provide the format or override the dateformats in CultureInflo like this #1389687Kingly
@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! :)Receptacle
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).Maximilian
C
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.

Candlewood answered 12/5, 2009 at 12:50 Comment(2)
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.Candlewood
Didn't make a difference in VS2017Bornie
B
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.

Banneret answered 17/7, 2013 at 14:8 Comment(1)
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.Pronation
U
1

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/

Unblock answered 23/10, 2019 at 11:55 Comment(0)
I
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.

Inhabited answered 7/8, 2013 at 13:33 Comment(0)
L
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.

Lab answered 23/7, 2019 at 0:1 Comment(1)
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.Lab
A
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.

Alburg answered 5/9, 2019 at 8:45 Comment(0)
B
-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
Bretbretagne answered 13/2, 2018 at 16:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.