我在该文本框中有一个文本框如果我键入一些文本n按空格键盘或键盘文本正在从英语转换为kannada [英] I have a textbox in that textbox if i type some text n press space or tab from keyboard the text is converting from english to kannada
本文介绍了我在该文本框中有一个文本框如果我键入一些文本n按空格键盘或键盘文本正在从英语转换为kannada的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在该文本框中有一个文本框,如果我键入一些文本n按键空格或键盘,文本正在从英语翻译成kannada,现在我按一个按钮我要翻译按钮点击事件.plss帮我怎么样我能做到这一点..谢谢你
I have a textbox in that textbox if i type some text n press space or tab from keyboard the text is translating from english to kannada,Now I m taking one button i want to translate on button click event.plss help me how can i do this..thank u
推荐答案
一般来说,当你的焦点从相应的文本框移动时,你的文本会转换为kannada。
所以在你的设计页面上,双击按钮,用这个标签打开aspx.cs页面 -
Generally your text is converting to kannada when your focus moves from the respective textBox.
So on your design page, double click on the button , the aspx.cs page ll be opened with this tag-
protected void Button1_Click1(object sender, EventArgs e)
{
}
在此处粘贴转换代码,然后您可以通过按钮Click事件实现相同的效果。
Gotaitu ankotini .. :-)
所有最好的
Paste the conversion code here, then u can achieve the same with button Click event.
Gotaitu ankotini..:-)
All the very Best
这是一个为七个字母工作的示例方法tajmhal(如果一组拉丁字母必须被一个古吉拉特语字母取代,可能需要进行一些调整):
Here's a sample method working for the seven letters of "tajmhal" (it may need some tweaking if groups of latin letters must be replaced by one Gujarati character):
public static string Transliterate(string latinCharacters)
{
StringBuilder gujarati = new StringBuilder(latinCharacters.Length);
for (int i = 0; i < latinCharacters.Length; i ++)
{
switch (char.ToLower(latinCharacters[i]))
{
case 'a':
gujarati.Append('\u0abe');
break;
case 'h':
gujarati.Append('\u0ab9');
break;
case 'j':
gujarati.Append('\u0a9c');
break;
case 'l':
gujarati.Append('\u0ab2');
break;
case 'm':
gujarati.Append('\u0aae');
break;
case 't':
gujarati.Append('\u0aa4');
break;
}
}
return gujarati.ToString();
}
这篇关于我在该文本框中有一个文本框如果我键入一些文本n按空格键盘或键盘文本正在从英语转换为kannada的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文