Обмен посетителями
/*
* How to setup a textarea that allows Transliteration from English to Hindi.
*/
google.load("elements", "1", {packages: "transliteration"});
function OnLoad() {
var content = document.getElementById('content');
// Create the HTML for our text area
content.innerHTML = '
Type a word and hit space to get it in Hindi. ' +
'Click on a word to see more options.
' +
'' +
'
Type in (do not copy/paste): ' +
'namaste main yahan apke madad karane ke liye hun
';
var options = {
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:
[google.elements.transliteration.LanguageCode.HINDI],
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(['transliterateTextarea']);
}
google.setOnLoadCallback(OnLoad);