Translation Automation With Workflow And Google Apps Script
07 Jan 2016As described in the previous post, I’m discovering interesting ways to combine Workflow and Google Apps Script.
Here’s another engaging integration utilizing Google Translate to automatically generate localized content to send as email or share as a PDF from an iOS device.
For more on the Workflow app see iOS Automation with Workflow. You can download it on the App Store here.
If you are interested in using localization with a Google Form see TSFormTranslator.
Localize Content with Workflow and Google Apps Script
The Workflow app already provides fantastic translation capabilities.
Here’s a simple standalone workflow which …
- Prompts the user for text input
- Detects the origin language
- Translates the text into the selected language
- Prompts the user to share the content as a message, email or share as a PDF
Workflow |
---|
Text Translator (Click for workflow install page) |
With the integration of Google Apps Script, I’m able to provide rich text localized content to a distributed set of Workflow users.
CUSTOM TRANSLATOR
An example Google Apps Script which supplies localized rich text content to the iOS Workflow app to be sent as email or shared as a PDF after prompting for the translation language.
Content can include html for rich text.
Usage Example:
- Localized rich text content system for individuals or groups
Be sure to replace the Google Apps Script URLs found in the following example workflow with your own.
The second Google Apps Script URL in the following example workflow requires two parameters to be sent back to the Google Apps Script. Take care when replacing with your own URL.
Some inter-language translations may not be supported.
Workflow | Google Apps Script |
---|---|
Custom Translator (Click for workflow install page) | Custom Translator Script (Click to make a copy of the script in your Google account) |
See Deploying a script as a web app for more on deploying this Google Apps Script example in your environment.
Here’s the Google Apps Script code if you want to install the script manually.
Add content to the Google Apps Script project as html
files. See the Custom Translator Script for examples.
Here’s a simple example which includes html:
Posted with : google-apps-script, workflow