English Malalyalam Typing

auto English to Malayalam typing helper google translator

by Arun Prasad 9946146920

HTML

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

  <input type="text" id="Product_Name_M">

JavaScript

// Load the Google Transliterate API
        google.load("elements", "1", {
            packages: "transliteration"
        });

        function onLoad() {

            var options = {
                sourceLanguage:
                google.elements.transliteration.LanguageCode.ENGLISH,
                destinationLanguage:
                [google.elements.transliteration.LanguageCode.MALAYALAM],
                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(['Product_Name_M']);
        }
        google.setOnLoadCallback(onLoad);