Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I set up an Automator Service that receives selected text and then runs a simple shell script to pass the text to open google translate:


It opens google translate just fine, but doesn't pass the text along with it. How can I fix?

google translate service

share|improve this question

It worked for me as long as pass input was set to as arguments. You could try restarting or creating a new identical service like that.

You have to URL encode the input though:

open$(ruby -rcgi -e 'print CGI.escape(')

Or if you don't want to use ruby:

xxd -p | tr -d '\n' | sed 's/\(..\)/%\1/g'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.