Change language
-
Hi! In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?
Have a look at this: input language[^]
#region signature my articles #endregion
-
Hi! In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?
you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi
foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages) if(lang.LayoutName == "Farsi") { InputLanguage.CurrentInputLanguage = lang; break; }
and another way to change the language is through using cultures like
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);
good luck
-
you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi
foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages) if(lang.LayoutName == "Farsi") { InputLanguage.CurrentInputLanguage = lang; break; }
and another way to change the language is through using cultures like
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);
good luck
-
you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi
foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages) if(lang.LayoutName == "Farsi") { InputLanguage.CurrentInputLanguage = lang; break; }
and another way to change the language is through using cultures like
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);
good luck