Setting culture info programmaticly .NET 2.0

  • Thread starter Thread starter Michael Meyer
  • Start date Start date
M

Michael Meyer

hi,

I am writing a multilinguale desktop application and now I want to take
screenshots from the application for the documentation. But I need to
take the Screenshots in several languages. What do I have to do to force
my application e.g. to start in french language?

Regards

Michael
 
Michael said:
I am writing a multilinguale desktop application and now I want to take
screenshots from the application for the documentation. But I need to
take the Screenshots in several languages. What do I have to do to force
my application e.g. to start in french language?

If you can change the app, then there are Thread.CurrentCulture and
Thread.CurrentUICulture.

Arne
 
hi,

I am writing a multilinguale desktop application and now I want to take
screenshots from the application for the documentation. But I need to
take the Screenshots in several languages. What do I have to do to force
my application e.g. to start in french language?

Regards

Michael

--http://www.mchme.com

You can set it using Thread.CurrentCulture o CurrentUICulture

I guess this should be set before the form creates the controls. so
you should call it in the constructor of the form
 
You can set it using Thread.CurrentCulture o CurrentUICulture

I guess this should be set before the form creates the controls. so
you should call it in the constructor of the form

For localization testing purposes, I usually make my WinForms apps
understand a command-line switch such as "/culture:", and set
CurrentUICulture accordingly on the very first line of Main():

foo.exe /culture:fr-FR

Power users sometimes also appreciate the ability to override the
default UI locale for their OS.
 
Ignacio said:
You can set it using Thread.CurrentCulture o CurrentUICulture

I guess this should be set before the form creates the controls. so
you should call it in the constructor of the form

Thanks,

Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");

works fine.

Regards

Michael
 
Back
Top