// Durchlaufe alle Textelemente im Shop const elements = document.querySelectorAll("body *:not(script):not(style)"); elements.forEach(el => { el.childNodes.forEach(node => { if (node.nodeType === 3) { // nur Textknoten let text = node.nodeValue; for (const [de, en] of Object.entries(translations)) { const regex = new RegExp(de, "g"); text = text.replace(regex, en); } node.nodeValue = text; } }); }); });