Start a process with a different CultureInfo than the OS

  • Thread starter Thread starter Dirk Behnke
  • Start date Start date
D

Dirk Behnke

How can I start a new process with a different CultureInfo?

I have tried already to set the CultureInfo of the thread starting the
new process before creating the Process object, but it doesn't help.
 
Dirk,

Normally that should be enough,

Threading.Thread.CurrentThread.CurrentCulture = New
Globalization.CultureInfo("en-US")

Threading.Thread.CurrentThread.CurrentUICulture = New
Globalization.CultureInfo("en-US")


I hope this helps,

Cor
 
Cor said:
Dirk,

Normally that should be enough,

Threading.Thread.CurrentThread.CurrentCulture = New
Globalization.CultureInfo("en-US")

Threading.Thread.CurrentThread.CurrentUICulture = New
Globalization.CultureInfo("en-US")


I hope this helps,

Cor


Hi:

I think Dirk wants to know how to set the "CultureInfo" outside the
running process.

That means do not change the application code and just changes the
process CultureInfo from a luncher application.

It is similar the Microsoft AppLocale Utility.

I also want to know to do so.
 
Cor,
thanks for the info.
But as Jacky wrote it is not exactly what I mean

I want to start with my .Net application another process and
this process should start with a certain CultureInfo
e.g.

' remember old and set new CultureInfo
Dim CurrentCulture As System.Globalization.CultureInfo =
_System.Globalization.CultureInfo.CurrentCulture
System.Threading.Thread.CurrentThread.CurrentCulture = New
_System.Globalization.CultureInfo("en-US")


Dim prcNew As New Diagnostics.Process
prcNew.StartInfo.UseShellExecute = False
'omitted: set environment variables
prcNew.StartInfo.Arguments = sArgs
prcNew.StartInfo.FileName = sProcessFileName
prcNew.Start()

regards
Dirk
 
Dirk,

I would not know how to do that.

Maybe you even want to give this information to a wordprocessor, which uses
not even Net, so it does not use the globalization in the Net framework.

Cor
 
Back
Top