Link to home
Start Free TrialLog in
Avatar of Nargzul
Nargzul

asked on

Get exception in english in VS 2010

Hi!

I've a Visual Studio 2010 in english, but my OS is a MS Seven in French, then all exceptions comes in french.

Then I get all exception/compilation errors in french and I did prefer to get them in english(easier to find a solution on internet, easier to communicate on our error).

Is it possible? How?

Thank you!
Than
Avatar of rgautier
rgautier
Flag of United States of America image

1. Open Visual Studio, Tools and Click "Import and Export Settings⿦"A wizard appears and choose the last option - "Reset all Settings" Choose the right language for you and hit next.Courtesy: http://blogs.microsoft.co.il/blogs/shair/archive/2010/05/16/how-to-change-default-language-in-visual-studio.aspx
doh - nm - I read the question improperly.....my brain is fried...
This is the link you want, I believe: https://65.55.21.250/downloads/details.aspx?displaylang=en&FamilyID=7ee0d8a7-32fb-407d-a010-da3a7d93fc2fThe Visual Studio 2010 Language Pack will allow you to change the language - including error messages.
Avatar of Nargzul
Nargzul

ASKER

;) anything else?
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7ee0d8a7-32fb-407d-a010-da3a7d93fc2fThis link is better - as it uses the microsoft host name - instead of an IP address.
Description of the Language Pack:The Visual Studio 2010 Language Packs are free add-ons which can be installed on top of the English version of Visual Studio 2010 Professional. Language Packs provide partial localization for the Software User Interface (UI) and error messages. After installation of the language packs, a user can choose to switch user interface between English and the localized language. Visual Studio 2010 Language Packs are the result of the close collaboration between Microsoft and local academic communities.
Avatar of Nargzul

ASKER

I will try, but my UI is already in english, only exception are in french :(
Avatar of Nargzul

ASKER

So... It says me that there is not language package for this language(english) when I try to download.
I would think that if you switch your OS language to English when you run programs that Exceptions would print in English.  Because Exceptions are being fired from the OS, not from Visual Studio itself.So, you will have to switch the default locale of your Operating System to English while you are debugging programs.
Language packs or MUI packs are used to change the default language of Windows 7 to a language of your choice. For example, download and installing the French language pack will translate all the menus and options in Windows 7 into French.  (perhaps the opposite is true for English from French OS)This feature is only available in Windows 7 Enterprise and Ultimate. You can download these language packs via Windows Update. Google works as well. The hard part is installing them, which is outlined in the walkthrough below:If you do not have Win7 Enterprise or Ultimate - you may have to upgrade to get this feature.
ASKER CERTIFIED SOLUTION
Avatar of Nargzul
Nargzul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If will change the langauege of the OS or the current cultureInfo of your software, there will be times that in orginal language which is french, you will experience an error that will not be raise in english culture, specially if you are dealing with dates and numbers.

So, I think the safer place to change the localization in your situation is inside the try catch as shown below:



Try

Catch ex as exception
Dim FrenchCulture as new CultureInfo = Thread.CurrentThread.CurrentUICulture
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-us")
msgbox(ex.tostring)
Thread.CurrentThread.CurrentUICulture = FrenchCulture

end try

That provides for the Globalization of your own application using the .NET Globalization Framework - so that you can include Globalization features in your own application, and then select which resource file to utilize for the messages in your own application.However, without the language pack in your version of Windows, the resources are not loaded (in your system files) to display the error messages in English.  While this may allow you to globalize your own application, you still need the Windows resources to support displaying the error messages within Windows itself.  For this, I am certain you will need the MUI support.
Thread.CurrentThread.CurrentCulture instead
of
Thread.CurrentThread.CurrentUICulture

since it Thread.CurrentThread.CurrentUICulture is for UI only...

So try the below  code instead...

Try

Catch ex as exception
Dim FrenchCulture as new CultureInfo = Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us")
msgbox(ex.tostring)
Thread.CurrentThread.CurrentCulture = FrenchCulture

end try

I'm not sure that he will have the English error resources in his OS, though, without MUI Language Pack.Imagine if he were running Windows 7 Korean version ---- an exception is thrown from a File Chooser window....that exception is part of the resources provided with the File Chooser dll from the Windows kernel files...there is no reason that exception message would be available in English.While he can switch cultures for his application, he will not magically have the English language exception messages loaded to his computer.  The exceptions are Operating System level messages, NOT Visual Studio messages.  The MUI kits allow for multiple languages in the Operating System by providing Globalization resources in the downloaded languages.  This is probably the only way he will be able to do it without loading the English version of the Operating System.
If you think about it, just changing the Thread to Swahili isn't going to magically make his Operating System have the Exception messages in Swahili - even if he had the Swahili version of Visual Studio 2010.....