Reputation: 613
I need to fix the English language as input language even if the user selects Arabic keyboard for particular textbox.
Is it possible?
Once I set the input languae as English, it's changing to all textboxes and labels. But I am looking to fix it to English language for a particular textbox only.
Upvotes: 5
Views: 7395
Reputation: 4683
Yes, it's possible using the following in the Windows application.
private void textBox2_Enter(object sender, EventArgs e)
{
System.Globalization.CultureInfo TypeOfLanguage = new System.Globalization.CultureInfo("en-us");
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(TypeOfLanguage);
}
Upvotes: 4
Reputation: 77866
It defaults to English language I believe, and I don't think there is any "language" property present for textbox ... provided it's a web form. Take a look at Stack Overflow post Change input language for selected Controls - ASP.NET.
Upvotes: 1
Reputation: 14906
If this is WebForms you may well be able to use the solution in this question: Arabic text box
Something like (using jQuery):
$("#textBox").attr("lang", "en");
Upvotes: 0