المترجم الصوتي المتكامل ');
printWindow.document.close();
printWindow.print();
}function shareTranslation() {
const translatedText = translatedTextarea.value;
const shareText = `الترجمة الفورية: ${translatedText}`;
if (navigator.share) {
navigator.share({
title: 'ترجمة فورية',
text: shareText
}).catch(error => console.error('Error sharing', error));
} else {
const whatsappUrl = `https://wa.me/?text=${encodeURIComponent(shareText)}`;
window.open(whatsappUrl, '_blank');
}
}