Type in another Language in Asp.Net TextBox (Google Transliteration )


Some time as per client requirement we need TextBox which support different language.

We can do this by using  Google Transliteration.

use below code to achieve this.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">



   <script src="https://www.google.com/jsapi" type="text/javascript">


    <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],

                transliterationEnabled: true


            var control = new google.elements.transliteration.TransliterationControl(options);







    <form id="form1" runat="server">


    <asp:TextBox id="txtInput" runat="server" style="border: 2px solid Blue; height: 200px; margin-left: auto; width: 600px;" textmode="MultiLine"/>





Below is screen shot of my application..

This code support all the language which support by google..

Let me know in case of query.

Enjoy !!

Posted in |


Post a Comment