Well Im trying to design an .NET application which is similar to notepad
except
for which it supports multiple languages..
The Application consists of a rich textbox and a combo box
The system will have multiple keyboard languages installed.. And the
application when loading searches for the installed keyboard languages and
shows it in a combo box..
InputLanguage[] lang = new
InputLanguage[InputLanguage.InstalledInputLanguages.Count];
private void Form1_Load(object sender, EventArgs e)
{
InputLanguage.InstalledInputLanguages.CopyTo(lang, 0);
foreach (InputLanguage l in lang)
{
comboBox1.Items.Add(l.Culture.EnglishName);
}
comboBox1.SelectedIndex =
comboBox1.Items.IndexOf(InputLanguage.DefaultInput Language.Culture.EnglishName);
comboBox1.SelectedItem =
InputLanguage.DefaultInputLanguage.Culture.English Name;
}
Whenever the user changes the language then the current language is also
changed through the following code,,
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
InputLanguage.CurrentInputLanguage =
lang[comboBox1.SelectedIndex];
richTextBox1.Focus();
}
Though the input language is changed the content of the rich text box
remains unaltered...
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 &é"'(-
What I need is that when I change the language from English(United States)
to French (France) the text should also change from 12346 to &é"'(-
Earlier someone said me it is not possible until I record the keystrokes
that are being entered into the richtextbox..
so I m in need of a code that could do the above thing..
Thanks
Rajkiran