Use Hindi Hindi Transliteration In asp.Net Textbox To Language converter
In Asp.net & C# TextBox insert Hindi Transliteration.Here I am mainly targeting english to hindi transliteration. You can use any language which is supported by Google Transliteration.
To create a Hindi Textbox in ASP.Net using Google Transliteration, you have to add the following script source into your ASPX page.
After adding above script source file, Now write the following java script.
This is the full ASPX page code in Aspx Page.
In Asp.net & C# TextBox insert Hindi Transliteration.Here I am mainly targeting english to hindi transliteration. You can use any language which is supported by Google Transliteration.
To create a Hindi Textbox in ASP.Net using Google Transliteration, you have to add the following script source into your ASPX page.
<script src="https://www.google.com/jsapi"
type="text/javascript">
</script>
After adding above script source file, Now write the following java script.
<script language="javascript" type="text/javascript">
google.load("elements", "1", {packages: "transliteration"});
function onLoad() {
var options = {
//Source Language
sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
// Destination language to Transliterate
destinationLanguage: [google.elements.transliteration.LanguageCode.HINDI],
shortcutKey: 'ctrl+g',
transliterationEnabled: true
};
var control = new google.elements.transliteration.TransliterationControl(options);
control.makeTransliteratable(['YourTextBoxClientID']);
}
google.setOnLoadCallback(onLoad);
</script>
This is the full ASPX page code in Aspx Page.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MultiPagetoPdf.WebForm1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Hindi Textbox Demo</title>
<script src="https://www.google.com/jsapi" type="text/javascript">
</script>
<script language="javascript" type="text/javascript">
google.load("elements", "1", { packages: "transliteration" });
function onLoad() {
var options = {
//Source Language
sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
// Destination language to Transliterate
destinationLanguage: [google.elements.transliteration.LanguageCode.HINDI],
shortcutKey: 'ctrl+g',
transliterationEnabled: true
};
var control = new google.elements.transliteration.TransliterationControl(options);
control.makeTransliteratable(['TextBox1']);
}
google.setOnLoadCallback(onLoad);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:textbox id="TextBox1" runat="server" style="border: 1px solid black; height: 125px; margin-left: auto; width: 550px;" textmode="MultiLine">
</div>
</form>
</body>
</html>
Thanks



it's nic
ReplyDelete