﻿google.load("elements", "1", {
    packages: "transliteration"
});

function onLoad() {
    var options = {
        sourceLanguage:
                google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage:
                [google.elements.transliteration.LanguageCode.BENGALI],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };

    // Create an instance on TransliterationControl with the required
    // options.
    var control =
            new google.elements.transliteration.TransliterationControl(options);

    // For the given ids
    var ids = ["tinput", "tarea"];

    // Enable transliteration in the textbox with ids
    control.makeTransliteratable(ids);

    var otherControl = 
        new google.elements.transliteration.TransliterationControl(options);

    var otherids = ["tinput1", "tinput2"];

    otherControl.makeTransliteratable(otherids);
}

google.setOnLoadCallback(onLoad);