Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to force a localizable WinForms app to use the (default) Language property

I have a WinForms app in 4 different languages. The whole app was written in English, but I never set the Localization to en, or en-US. Is there a way to use to force the Language property to (default) from code. For instance, let's say that the current thread is in Portuguese, I close all forms, change the CultuInfo of the current thread to use the (default) language and reload all forms again. Is there a way o doing that?

Thanks

like image 409
b3bel Avatar asked Feb 02 '11 08:02

b3bel


1 Answers

I guess you are searching for the NeutralResourcesLanguage class. You use this attribute in your AssemblyInfo.cs file to set the default culture of an application:

[assembly: NeutralResourcesLanguage("en-US")]

Hope that helps.

like image 183
Martin Buberl Avatar answered Oct 23 '22 03:10

Martin Buberl