Koha/koha-tmpl/opac-tmpl/ccsr/en/js/googleindictransliteration.js
Jared Camins-Esakov 2ab4398fcf Bug 8597: Add CSS, JS, and images to ccsr theme
In order for themes to work, they must include all CSS, Javascript, and
image assets that they use. This patch adds all CSS, Javascript, and
images from the prog theme to ccsr, EXCEPT for the famfamfam image set,
which needs to be moved outside of the theme directories, per bug 8624.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-09-18 13:41:51 +02:00

27 lines
957 B
JavaScript

// Load the Google Transliteration API
google.load("elements", "1", {
packages: "transliteration"
});
function onLoad() {
var options = {
sourceLanguage: 'en',
destinationLanguage: ['hi','kn','ml','ta','te'],
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 textfields with the given ids.
var ids = [ "transl1" ];
control.makeTransliteratable(ids);
// Show the transliteration control which can be used to toggle between
// English and Hindi and also choose other destination language.
control.showControl('translControl');
}
google.setOnLoadCallback(onLoad);