Fast translation with Google Translator and MAC OSX

Luke Dorosz
Oct 21, 2015 · 2 min read

For most of you and me, Google Translator is a very useful tool in daily work life. But Copy text or word and Paste into browser with opened Google Translator consume a lot of time.

Google Translator and Mac OSX

Fortunately there is solution I found somewhere in the Internet to improve this tool and safe a lot of time. Using Automator you can integrate a Goole Translator with MAC OSX in few steps:

  • Open an Automator and create a new Service.
  • The top section set in this way:
  • From the left column you need to find and grab two functions: Run Apple Script and Website Popup.
  • Copy and Paste this code into Apple Script window.
on run {input, parameters}
set output to "" & urldecode(input as string)
return output
end runon urldecode(x)
set cmd to "'require \"cgi\"; puts CGI.escape('"
do shell script "echo " & quoted form of x & " | ruby -e " & cmd
end urldecode

[UPDATE.12.2018- I paste the code that I used on the lastest Mac OS]

In the second line the url is configured with the parameter sl=auto, so it means that language of a translated word will be automatically detected. Of course you can set manually this value for the preferred language code.

  • As last step you can customise a Website Popup window size, position and browser.

Save and use

After save, a configured script is ready to use.

One way to work with a tool is to highlight a word and by right click go to Services and select a saved script:

As a result you will see this window:

Second method which I prefer is to create keyboard shortcut and use it with highlighted words.

To create a keyboard shortcut go to System Preferences -> Keyboard and Shortcuts tab. Next on the left, select Services and when you will find your created service, configure your own shortcut.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store