<%@ 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="Translation" runat="server" TextMode="MultiLine" onkeypress="GetChar (event);">
<asp:TextBox ID="Result" runat="server" TextMode="MultiLine" >
</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