Se si desidera aggiungere strumenti di immissione di Google è possibile utilizzare il codice qui sotto per aggiungerlo
<script type="text/javascript" src="http://www.google.com/jsapi">
</script>
<script type="text/javascript">
// Load the Google Transliteration API
google.load("elements", "1", {
packages: "transliteration"
});
function onLoad() {
var options = {
sourceLanguage: 'en',
destinationLanguage: ['ml', 'hi','kn','ta','te'],
shortcutKey: 'ctrl+m',
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 = [ "language" ];
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);
</script>
Area di testo
<form><textarea name="ta" rows="6" id="language" cols="6" style="width:600px;height:218px" ></textarea></form>
fonte
2015-03-09 15:23:20
Grazie, questo mi aiuta. Ma ho trovato un problema con questo, suggerisce solo la parola dopo l'ictus "Barra spaziatrice", è possibile elencare il suggerimento su ogni tratto chiave? –
Mi hai salvato. Funziona bene .. :) – Arun
Sto usando questo in jQuery e non funziona correttamente –