google.load(elements,1,{ package:translitera }); 函数onLoad(){ var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: google.elements.transliteration.LanguageCode.HINDI, shortcutKey:''ctrl + g'', transliterationEnabled:true }; / /使用所需的 //选项在TransliterationControl上创建一个实例。 var control = new google.elements.transliteration.TransliterationControl(options ); //在文本框中启用带有id //''transliterateTextarea''的音译。 control.makeTransliteratable([''<%= Translation.ClientID%>' ]); control.makeTransliteratable([''<%= Result.ClientID%>'']); } google.setOnLoadCallback(onLoad); < / script> < script type = text / javascript> 函数GetChar(事件){ var chCode =(事件中'''charCode'')? event.charCode:event.keyCode; var out1 = document.getElementById(''<%= Result.ClientID%>''); var pnb = document.getElementById(''<%= Translation.ClientID%>'')。value; out1.value + = String.fromCharCode(chCode); } < / script> < / head> < body> < form id =form1runat =server><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <link href="http://www.google.com/uds/modules/elements/transliteration/api.css" type="text/css" rel="stylesheet"/> <script type="text/javascript"> // Load the Google Transliteration API //ÔñÛ ¬ÝÏÞ ÕÏÚ©ÔÅ ÆÉÚШ ÕØ¥Û Ó¨ÞÐ google.load("elements", "1", { packages: "transliteration" }); function onLoad() { var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: google.elements.transliteration.LanguageCode.HINDI, shortcutKey: ''ctrl+g'', transliterationEnabled: true }; // Create an instance on TransliterationControl with the required // options. var control = new google.elements.transliteration.TransliterationControl(options); // Enable transliteration in the textbox with id // ''transliterateTextarea''. control.makeTransliteratable([''<%=Translation.ClientID %>'']); control.makeTransliteratable([''<%=Result.ClientID %>'']); } google.setOnLoadCallback(onLoad); </script> <script type="text/javascript"> function GetChar(event) { var chCode = (''charCode'' in event) ? event.charCode : event.keyCode; var out1 = document.getElementById(''<%=Result.ClientID %>''); var pnb = document.getElementById(''<%=Translation.ClientID %>'').value; out1.value += String.fromCharCode(chCode); } </script> </head><body> <form id="form1" runat="server"> < asp:TextBox ID =翻译runat =serverTextMode =MultiLine onkeypress =GetChar(event);> < asp:TextBox ID =Resultrunat =serverTextMode =MultiLine> <asp:TextBox ID="Translation" runat="server" TextMode="MultiLine" onkeypress="GetChar (event);"> <asp:TextBox ID="Result" runat="server" TextMode="MultiLine" > < / form> < / body> < / html> ........... 以上是我输入英文的代码并将其转换为印地文.... 这里第一个文本框的值是con转入印度语,第二个是英语。 但是我希望第二个文本框应该转换成印地文... 问候。 GC Maurya </form></body></html>...........above is my code to type in English and convert it in to hindi....here the value of first textbox is converted into hindi and second is into english.but i want the the second textbox should be converted into hindi...Regards.G.C. Maurya推荐答案我最近了解到,在印度,人们经常使用基于音译的输入法。这不是一个很好的本土方式;它使整个文化完全依赖于英语 - 基础文化,并使当地的印度文化处于顺从的位置。我想,它深深植根于印度拥有许多不同的书写系统,而在世界其他地方则更多。 顺便说一下,你不应该谈论印地语,你应该谈谈许多现代印度语言和梵语中使用的剧本,这是Devanāgarī,देवनागरी。 br $> b $ b 我想知道:有没有人费心去文明的方式不是基于拉丁文字,因为它是为西里尔文,希腊语甚至中文和日文做的?这种方式是制作原始键盘布局,可以通过标准输入语言开关切换。 使用Microsoft键盘布局创建器可以解决此问题。请参阅: http://msdn.microsoft.com/en-us /goglobal/bb964665.aspx [ ^ ]。 基本上,您可以加载此应用程序,创建布局,然后编译项目。它将创建一个标准的setup.exe文件,该文件为不同的指令集架构提供安装,具体取决于目标系统中使用的内容。然后你安装并使用它。 来自印度的一些人告诉我,有些脚本太大而不适合西方键盘。这是真的,但我不认为这是一个塞子。可以使用 dead char 功能输入额外的字符(两个键相互跟随,只产生一个字符;请参阅应用程序的帮助以获得解释)。或者,对于一个脚本,您可以使用两个而不是一个键盘布局在它们之间切换。毕竟,我使用西方键盘键入西里尔语,其中某些角色不适合,我没有在键上打印西里尔字母,但是,我没有打扰打字。 请使用这个想法,你可以创造出有尊严的印度文本输入模式。如果您需要帮助,我很乐意提供。 :-) -SAI recently learned that in India people often use input method based on transliteration. This is not a nice native way; it makes the whole culture fully dependent on English-basic culture, and put local Indian cultures in a submissive position. I guess, the it is deeply rooted in the fact of having many different writing systems in India, more then in the rest of the worlds taken together.By the way, you should not talk about Hindi, you should talk about the script used in many modern Indian languages and also Sanskrit, this is Devanāgarī, देवनागरी.I was wondering: did anyone bother to go in a civilized way not based on Latin script, as it is done for Cyrillic, Greek and even for Chinese and Japanese language? This way is making an original keyboard layouts, which can be switched by the standard input language switch.This problem can be solved using the The Microsoft Keyboard Layout Creator. Please see:http://msdn.microsoft.com/en-us/goglobal/bb964665.aspx[^].Basically, you can load this application, create a layout, and then compile the project. It will create a standard "setup.exe" file which provides the installation for different instruction-set architectures, depending on what is used in the target system. Then you install and use it.Some people from India told me that some scripts are too big to fit in the Western keyboard. That''s true, but I don''t think this is a stopper. Extra character can be entered using the dead char feature (two keys following each other, producing only one character; please see the help on the application for the explanation). Alternatively, for one script, you can use two, not one keyboard layout, switching between them. After all, I type in Cyrillic using a Western keyboard where some character don''t fit, and I don''t have Cyrillic letters printed on the keys, nevertheless, I have no hassled typing.Please use this idea, and you can create decent Indian text input modes, with dignity. If you need some help, I''ll gladly provide it. :-)—SA 这篇关于输入印地语和英语的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 08:32