Setting culture info programmaticly .NET 2.0

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
 
A

Arne Vajhøj

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
 
I

Ignacio Machin ( .NET/ C# MVP )

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
 
P

Pavel Minaev

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.
 
M

Michael Meyer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top