Martin Katumba

Martin Katumba

  • 1.6k
  • 103
  • 2.2k

An a new input language to windows

Dec 4 2018 11:49 PM
Hi pals,
How can i add/install a new input language to windows via code.
 
I have been able to change the input language for my form using the code below:
 
System.Windows.Forms.InputLanguage original;
private void barButtonItem18_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
original = System.Windows.Forms.InputLanguage.CurrentInputLanguage;
var culture = System.Globalization.CultureInfo.GetCultureInfo("ar-SA");
var language = System.Windows.Forms.InputLanguage.FromCulture(culture);
if (System.Windows.Forms.InputLanguage.InstalledInputLanguages.IndexOf(language) >= 0)
System.Windows.Forms.InputLanguage.CurrentInputLanguage = language;
else
System.Windows.Forms.InputLanguage.CurrentInputLanguage = System.Windows.Forms.InputLanguage.DefaultInputLanguage;
}
but this code will always sets the input language to default when the language input i am setting to is not in the list of installed windows input language.
 
So how can in add a new input language to the windows via code