Skip to content
Menu
Learning Lessons Today
Learning Something New Everyday!
Home
Learn English
English Lessons
Services
Close Menu
Advanced Text Manipulation Tool
Advanced Text Manipulation Tool
Original Text
Select Sentences (Filter by Tense)
Show All
Present Simple Positive (am, are, is)
Present Simple Negative (isn’t, aren’t, am not)
Present Continuous Positive (am, are, is + ing)
Present Continuous Negative (isn’t, aren’t, am not + ing)
Past Simple Positive (was, were)
Past Simple Negative (wasn’t, weren’t)
Past Continuous Positive (was, were + ing)
Past Continuous Negative (wasn’t, weren’t + ing)
Future Simple Positive (will be)
Future Simple Negative (won’t be, will not be)
Future Continuous Positive (will be + ing)
Future Continuous Negative (won’t be + ing, will not be + ing)
Apply Selection
Filtered Output
Copy Output to Input
Back To Top
(function () { const extractTextLines = html => { const temp = document.createElement('div'); temp.innerHTML = html; return temp.innerHTML.split('
').map(line => line.replace(/<[^>]*>?/gm, '').trim() ); }; const translateLine = async (line, lang) => { if (lang === 'en') return line; const url = `https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${lang}&dt=t&q=${encodeURIComponent(line)}`; const res = await fetch(url); const data = await res.json(); return data[0].map(d => d[0]).join(' '); }; const renderText = async (id, lang) => { const template = document.getElementById('template-' + id); const container = document.getElementById('original-text-' + id); if (!template || !container) return; const html = template.innerHTML; const lines = extractTextLines(html); const translatedLines = []; for (let line of lines) { if (!line.trim()) { translatedLines.push(''); } else { const translated = await translateLine(line, lang); translatedLines.push(translated); } } container.innerHTML = ''; const block = document.createElement('p'); block.innerHTML = translatedLines.join('
'); container.appendChild(block); }; document.addEventListener('DOMContentLoaded', function () { const blocks = document.querySelectorAll('.translator'); blocks.forEach(block => { const id = block.dataset.id; const select = document.getElementById('language-select-' + id); const container = document.getElementById('original-text-' + id); const template = document.getElementById('template-' + id); if (!select || !container || !template) return; // Load default (English) text renderText(id, 'en'); // Update on language change select.addEventListener('change', function () { renderText(id, this.value); }); }); }); })();