f4bd79217c
To Test: Use Google Indic Transliteration API to allow users to transliterate english typed words into Indic languages. http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=6ae7b60962e7d07aa00a45a7af692939a4ce7aa6 Signed-off-by: Frederic Demians <f.demians@tamil.fr> I had been able to reproduce the bug (a regression), and I can confirm that this patch fix it. But I had to create manualy GoogleIndicTransliteration system preference, which doesn't exist in standard .pref file. It may be necessary to add it. In my opinion, it shouldn't prevent to include this patch. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixes a somewhat 'hidden' feature, no problems found. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
27 lines
959 B
JavaScript
27 lines
959 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: false
|
|
};
|
|
|
|
// 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 = [ "translControl1" ];
|
|
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);
|