I've created a fairly simple script which finds English and replaces it with Spanish words.
function translatesp() {
var body = DocumentApp.getActiveDocument()
.getBody();
body.replaceText('Master Change Log', 'Historial de Cambios');
body.replaceText('Prepared for:', 'Preparado para:');
body.replaceText('Git Reference', 'Referencia Git');
}
What I would like to do is have a list somewhere (probably on a separate google sheet) with all of my English and Spanish words in columns, and then change my script to look for everything in the English column and then replace it with the relevant Spanish entry, so that I don't need to keep adding vocabulary to script itself. How would one go about this?
Thanks in advance.
