Last active
August 29, 2015 14:21
-
-
Save chipoglesby/c215b9693e91601a2cc4 to your computer and use it in GitHub Desktop.
Translating Google Spreadsheet cells using Google Translate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onEdit(e) { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var name = sheet.getName(); | |
| var cell = sheet.getActiveCell(); | |
| var value = cell.getValue(); | |
| if (typeof value == 'string') { | |
| var spanish = LanguageApp.translate(value, 'en', 'es'); | |
| cell.setValue(spanish); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment