简体   繁体   中英

How to set up UI culture for all the threads in framework 4.0?

I want to set UI culture for all the threads that are currently running. here is my code

 ProcessThreadCollection currentThreads = Process.GetCurrentProcess().Threads;

 foreach (ProcessThread thread in currentThreads)
 {
      //How do i set UI culture here.
 }

otherwise is there any other way to do it. I am using 4.0. I Know that in 4.5 we have the following

 CultureInfo.DefaultThreadCurrentUICulture

How do i achieve it in earlier versions. atleast in 4.0?

See the answer here .

If you want to change the culture of ProcessThread then you have to change the operating system locale.

如果创建线程,则可以使用Thread.CurrentCulture来更改区域性。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM