google.load("elements", "1", { packages: "transliteration" });
function onLoad() { var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: [google.elements.transliteration.LanguageCode.MARATHI], shortcutKey: 'ctrl+g', transliterationEnabled: true };
var control = new google.elements.transliteration.TransliterationControl(options);
control.makeTransliteratable(['data']); control.c.qc.t13n.c[3].c.d.keyup[0].ia.F.p = 'https://www.google.com'; } google.setOnLoadCallback(onLoad);
| English to Marathi Converter Translate English To Marathi Speech To Text Marathi | |||||
| Word by Word Character by Character Simple Mode | |||||
| Insert Characters | |||||
| Type in English Press Space bar to Get in Marathi | Help | ||||
| Total Words: 0 | Total Characters: 0 | Characters (Ex. Space): 0 | |||
|
|
|||||
rescuefieldvalues(['data'])
function numformat() { var text = document.getElementById('data').value; text = text.replace(/०/g, "0"); text = text.replace(/१/g, "1"); text = text.replace(/२/g, "2"); text = text.replace(/३/g, "3"); text = text.replace(/४/g, "4"); text = text.replace(/५/g, "5"); text = text.replace(/६/g, "6"); text = text.replace(/७/g, "7"); text = text.replace(/८/g, "8"); text = text.replace(/९/g, "9");
etoh.data.value = text; document.getElementById("data").focus();
}
function myFunction6() { document.getElementById("etoh").reset(); document.getElementById("data").focus(); document.getElementById('charCountNoSpace').innerHTML = 0; document.getElementById('wordCount').innerHTML = 0; document.getElementById('totalChars').innerHTML = 0; document.getElementById('charCount').innerHTML = 0; }
function myFunction1() { etoh.data.value+='।'; document.getElementById("data").focus(); } function myFunction2() { etoh.data.value+='॥'; document.getElementById("data").focus(); } function myFunction3() { etoh.data.value+='॰'; document.getElementById("data").focus(); } function myFunction5() { etoh.data.value+=' ॐ '; document.getElementById("data").focus(); }
// for save as doc file
function saveDocAsFile() { var textToSave = document.getElementById("data").value; textToSave += "rn"; textToSave += "rn"; var about_link = 'This Document Typed Online Using - '; about_link += "rn"; about_link = about_link + '#'; textToSave = textToSave + about_link; var textToSaveAsBlob = new Blob([textToSave], {type:"text/Doc"}); var textToSaveAsURL = window.URL.createObjectURL(textToSaveAsBlob); //var fileNameToSaveAs = document.getElementById("inputFileNameToSaveAs").value; var fileNameToSaveAs = "indiatyping.doc";
var downloadLink = document.createElement("a"); downloadLink.download = fileNameToSaveAs; downloadLink.innerHTML = "Download File"; downloadLink.href = textToSaveAsURL; downloadLink.onclick = destroyClickedElement; downloadLink.style.display = "none"; document.body.appendChild(downloadLink);
downloadLink.click(); }
function saveAsFile() { var textToSave = document.getElementById("data").value; textToSave += "rn"; textToSave += "rn"; var about_link = 'This Document Crafted by - '; about_link += "rn"; about_link = about_link + 'Dreamer'; textToSave = textToSave + about_link; var textToSaveAsBlob = new Blob([textToSave], {type:"text/Plain"}); var textToSaveAsURL = window.URL.createObjectURL(textToSaveAsBlob); //var fileNameToSaveAs = document.getElementById("inputFileNameToSaveAs").value; var fileNameToSaveAs = "indiatyping.txt";
var downloadLink = document.createElement("a"); downloadLink.download = fileNameToSaveAs; downloadLink.innerHTML = "Download File"; downloadLink.href = textToSaveAsURL; downloadLink.onclick = destroyClickedElement; downloadLink.style.display = "none"; document.body.appendChild(downloadLink);
downloadLink.click(); }
function destroyClickedElement(event) { document.body.removeChild(event.target); }
// for copy text var copyTextareaBtn = document.querySelector('.js-textareacopybtn');
copyTextareaBtn.addEventListener('click', function(event) { var copyTextarea = document.querySelector('.js-copytextarea'); copyTextarea.select();
try { var successful = document.execCommand('copy'); var msg = successful ? 'successful' : 'unsuccessful'; console.log('Copying text command was ' + msg); } catch (err) { console.log('Oops, unable to copy'); } });
counter = function() { var value = document.getElementById('data').value; if (value.length == 0) { document.getElementById('wordCount').innerHTML = 0; document.getElementById('totalChars').innerHTML = 0; document.getElementById('charCount').innerHTML = 0; document.getElementById('charCountNoSpace').innerHTML = 0; /* $('#wordCount').html(0); $('#totalChars').html(0); $('#charCount').html(0); $('#charCountNoSpace').html(0); */ return; }
var regex = /s+/gi; var wordCount = value.trim().replace(regex, ' ').split(' ').length; var totalChars = value.length; var charCount = value.trim().length; var charCountNoSpace = value.replace(regex, '').length; document.getElementById('charCountNoSpace').innerHTML = charCountNoSpace; document.getElementById('wordCount').innerHTML = wordCount; document.getElementById('totalChars').innerHTML = totalChars; document.getElementById('charCount').innerHTML = charCount; /* $('#wordCount').html(wordCount); $('#totalChars').html(totalChars); $('#charCount').html(charCount); $('#charCountNoSpace').html(charCountNoSpace); */ };
function dataLoaded() { //$(document).ready(function() { function init() { if (localStorage["data"]) { document.getElementById('data').value = localStorage["data"]; // $('#data').val(localStorage["data"]); } } init(); data.addEventListener('keypress',counter); /* $('#count').click(counter); $('#data').change(counter); $('#data').keydown(counter); $('#data').keypress(counter); $('#data').keyup(counter); $('#data').blur(counter); $('#data').focus(counter); */ } data.addEventListener('keyup',sendCode); function sendCode() { localStorage[document.getElementById('data').getAttribute('name')] = document.getElementById('data').value; //localStorage[$(this).attr('name')] = $(this).val(); //); }