0

i have a dll that it have a form and this form support two language (with loacalizable,language property).

and after that i add our dll to the main project and call the form from dll. the language of the form still in the default mode.

I must say that I set the value of the CurrentCulture and CurrentUICulture in the program.cs as follows :

Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-IQ"); 
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-IQ");

Q: how i can change the defualt culture of the form from outside a dll or into dll but programically?

please anyone help me.

Thanks

  • Try: CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("ar-IQ"); and CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("ar-IQ"); – T.Schwarz Jan 11 '22 at 13:18
  • Dear @T.Schwarz , Thank you for your response. I have tried this before and unfortunately it was not successful – Arash Jalali Jan 11 '22 at 13:46
  • Note that you don't change current culture for a dll, you can apply a Culture Info to a thread, so two threads can have different cultures and call the same class/methods in a dll – Gian Paolo Jan 11 '22 at 15:03

0 Answers0