I am developing a multilingual program in C# on Windows
How to change Windows writing language on certain actions...
e.g. to change from English to Arabic on focus event.
Thanks
I am developing a multilingual program in C# on Windows
How to change Windows writing language on certain actions...
e.g. to change from English to Arabic on focus event.
Thanks
Thread.CurrentThread.CurrentCulture = yournewculture;
Also see the CurrentUICulture
property.
To select a whole new culture, set the CurrentThread.CurrentCulture
to a new culture, e.g. to set to French:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("fr-FR");
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
You can find a list of the predefined CultureInfo
names here.
If you want to change certain aspects of the default culture, you can grab the current thread's culture, use it it's name to create a new CultureInfo instance and set the thread's new culture with some changes, e.g. to change the current culture to use the 'Euro' symbol:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo( System.Threading.Thread.CurrentThread.CurrentCulture.Name);
ci.NumberFormat.CurrencySymbol = "€";
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
Hi,
These similar post may shed some light
http://stackoverflow.com/questions/397356/develop-multilingual-windows-application-c
http://stackoverflow.com/questions/270829/internationalizing-desktop-app-within-a-couple-years-what-should-we-do-now
Cheers!