Is it possible to change CurrentUICulture of main thread when event is raised in worker thread?
Code for ilustration:
static void Main()
{
//do something
Thread workerThread = new Thread(new ThreadStart(DoWork));
workerThread.Start();
//do something
}
void DoWork()
{
ConnectDatabase();
//do some work
ChangeLanguage(lang);
}
void ChangeLanguage(string lang)
{
//this line changes Culture only for worker thread
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture(lang);
}