R
Rajkiran R.B.
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.InstalledInputLanguages.Count];
private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.LanguageOption =
RichTextBoxLanguageOptions.AutoKeyboard;
InputLanguage.InstalledInputLanguages.CopyTo(lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items.Add(l.Culture.EnglishName);
}
comboBox1.SelectedIndex =
comboBox1.Items.IndexOf(InputLanguage.DefaultInputLanguage.Culture.EnglishName);
comboBox1.SelectedItem =
InputLanguage.DefaultInputLanguage.Culture.EnglishName;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
InputLanguage.CurrentInputLanguage =
lang[comboBox1.SelectedIndex];
richTextBox1.Focus();
}
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.InstalledInputLanguages.Count];
private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.LanguageOption =
RichTextBoxLanguageOptions.AutoKeyboard;
InputLanguage.InstalledInputLanguages.CopyTo(lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items.Add(l.Culture.EnglishName);
}
comboBox1.SelectedIndex =
comboBox1.Items.IndexOf(InputLanguage.DefaultInputLanguage.Culture.EnglishName);
comboBox1.SelectedItem =
InputLanguage.DefaultInputLanguage.Culture.EnglishName;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
InputLanguage.CurrentInputLanguage =
lang[comboBox1.SelectedIndex];
richTextBox1.Focus();
}
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