Well I have multiple keyboard layouts installed in my system..
I have written a program in C# such that the required input language can be
selected using the following piece of code
InputLanguage[] lang = new
InputLanguage[InputLanguage.I nstalledInputLa nguages.Count];
private void Form1_Load(obje ct sender, EventArgs e)
{
richTextBox1.La nguageOption =
RichTextBoxLang uageOptions.Aut oKeyboard;
InputLanguage.I nstalledInputLa nguages.CopyTo( lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items .Add(l.Culture. EnglishName);
}
comboBox1.Selec tedIndex =
comboBox1.Items .IndexOf(InputL anguage.Default InputLanguage.C ulture.EnglishN ame);
comboBox1.Selec tedItem =
InputLanguage.D efaultInputLang uage.Culture.En glishName;
}
private void comboBox1_Selec tedIndexChanged (object sender, EventArgs e)
{
InputLanguage.C urrentInputLang uage =
lang[comboBox1.Selec tedIndex];
richTextBox1.Fo cus();
}
So with the above code I could change the language and the change can be
seen when I type.. But however the existing text in the rich text box
doesn't
change.. I would the existing text also to change when I change the
language..
For example
when the Input Language Is selected as English(United States) when I press
the keys 1,2,3,4,5,6
I get in the textbox as 123456
when the input language Is selected as French (France) when I press the keys
1,2,3,4,5,6
I get in the textbox as &é"'(-
Now what I require is without manually entering the text everytime. the text
should change according to the language selected..
ie..
123456 should automatically change to &é"'(-
Can anyone help me please.
Thanks In Advance
I have written a program in C# such that the required input language can be
selected using the following piece of code
InputLanguage[] lang = new
InputLanguage[InputLanguage.I nstalledInputLa nguages.Count];
private void Form1_Load(obje ct sender, EventArgs e)
{
richTextBox1.La nguageOption =
RichTextBoxLang uageOptions.Aut oKeyboard;
InputLanguage.I nstalledInputLa nguages.CopyTo( lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items .Add(l.Culture. EnglishName);
}
comboBox1.Selec tedIndex =
comboBox1.Items .IndexOf(InputL anguage.Default InputLanguage.C ulture.EnglishN ame);
comboBox1.Selec tedItem =
InputLanguage.D efaultInputLang uage.Culture.En glishName;
}
private void comboBox1_Selec tedIndexChanged (object sender, EventArgs e)
{
InputLanguage.C urrentInputLang uage =
lang[comboBox1.Selec tedIndex];
richTextBox1.Fo cus();
}
So with the above code I could change the language and the change can be
seen when I type.. But however the existing text in the rich text box
doesn't
change.. I would the existing text also to change when I change the
language..
For example
when the Input Language Is selected as English(United States) when I press
the keys 1,2,3,4,5,6
I get in the textbox as 123456
when the input language Is selected as French (France) when I press the keys
1,2,3,4,5,6
I get in the textbox as &é"'(-
Now what I require is without manually entering the text everytime. the text
should change according to the language selected..
ie..
123456 should automatically change to &é"'(-
Can anyone help me please.
Thanks In Advance