Workflow Automator: Translate This

Apple’s Automator is a great to for scripting those activities that you find yourself doing over an over. I needed a way to translate a selection of text. I created this simple Automator workflow to grab the selected text and send it to Google’s Translation service. This flow is for English but you can edit the script to change the target language to anything you want.

Here are the steps in the workflow if you want to roll your own.

  1. Run AppleScript
    on run {input, parameters}
    copy "" & input to urlx
    return urlx
    end run
  2. Display Webpages

That’s the entire script. Enjoy.

Installation: Download Double-click on the zip file to open it up. Copy the “Translate This” workflow file to your ~/Library/Services folder. The ~/ is your home folder. You can get there from your “Go” menu.

It would be nice if the script could grab the page, find the translated DIV and then just display an alert with the translated text. That would save having to open a new Safari connection. This is just a first pass to make it useful.

Leave a Reply