Does anyone have an idea why my code is not working? I get English strings everywhere.
Note that is not an ASP.NET project but an actual WinForms project.
I have set up a windows forms project to use localization so that it will support Arabic and English languages.
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Admin admin = new Admin();
this.Close();
admin.Show();
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-KW");
Admin admin = new Admin();
this.Close();
admin.Show();
and I try this ;
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
this.Controls.Clear();
this.RightToLeftLayout = false;
InitializeComponent();
Properties.Settings.Default["lang"] = "en-US";
Properties.Settings.Default.Save();
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-KW");
this.Controls.Clear();
InitializeComponent();
Properties.Settings.Default["lang"] = "ar-KW";
Properties.Settings.Default.Save();
It works when I test it by starting to debug but when I set up the application it stops working.