Return to Snippet

Revision: 45905
at May 10, 2011 21:25 by kashif21


Updated Code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
*Note for the time beign the transliteration will be from English to URDU
//just copy and paste and use this generic foriegn language text box,you just need to replace URDU with any language like(AMHARIC,ARABIC,BENGALI,GREEK and many more...!)

    <script src="https://www.google.com/jsapi" type="text/javascript">
</script>
<script type="text/javascript" language="javascript">
    google.load("elements", "1", {
        packages: "transliteration"
    });

    function onLoad() {
        var options = {
            sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
            destinationLanguage: [google.elements.transliteration.LanguageCode.URDU],
            shortcutKey: 'ctrl+g',
            transliterationEnabled: true
        };
            
    var control = new google.elements.transliteration.TransliterationControl(options);
    control.makeTransliteratable(['Text1']);
//TEXT1 is the id of the control which you will use for the transliteration.
    }
    google.setOnLoadCallback(onLoad);
</script>
</head>
<body >
    <form id="form1" runat="server">
    <div>
    <div class="Google-transliterate-Way2blogging">
        <input id="Text1" type="text" />
 
 //if text area rquired
// <textarea id="transliterateTextarea" style="width:600px;height:200px" cols="10" rows="10"></textarea>

</div>
    </div>
    </form>
</body>
</html>

Revision: 45904
at May 10, 2011 21:17 by kashif21


Initial Code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
*Note for the time beign the transliteration will be from English to URDU
//just copy and paste and use this generic foriegn language text box,you just need to replace URDU with any language like(AMHARIC,ARABIC,BENGALI,GREEK and many more...!)

    <script src="https://www.google.com/jsapi" type="text/javascript">
</script>
<script type="text/javascript" language="javascript">
    google.load("elements", "1", {
        packages: "transliteration"
    });

    function onLoad() {
        var options = {
            sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH,
            destinationLanguage: [google.elements.transliteration.LanguageCode.URDU],
            shortcutKey: 'ctrl+g',
            transliterationEnabled: true
        };
            
    var control = new google.elements.transliteration.TransliterationControl(options);
    control.makeTransliteratable(['Text1']);
    }
    google.setOnLoadCallback(onLoad);
</script>
</head>
<body >
    <form id="form1" runat="server">
    <div>
    <div class="Google-transliterate-Way2blogging">
        <input id="Text1" type="text" />
    <textarea id="transliterateTextarea" style="width:600px;height:200px" cols="10" rows="10"></textarea>

</div>
    </div>
    </form>
</body>
</html>

Initial URL


Initial Description


Initial Title
Simple code to write diffrent languges in you text box by using google transliteration

Initial Tags


Initial Language
ASP