Automator > Services > Run Apple Script
AppleScript to translate English to German
on run {input, parameters} set phrase to input as string set phrase to quoted form of phrase set ui_lang to "en" set from_lang to "de" set to_lang to "en" do shell script "open 'https://translate.google.com/?hl='" & ui_lang & "'&sl='" & from_lang & "'&tl='" & to_lang & "'&text='" & phrase end run
File > Save
Run using Services menu
If you want to do this using Quick Look option;
Automator > Services > Run JavaScript
function run(input) { var output = "http://translate.google.com/#de/en/" + encodeURIComponent(input) return output; }
OR for Seslisozluk
function run(input) { var output = "http://seslisozluk.com/" + encodeURIComponent(input) return output; }
Add Library Window Popup
File > Save
Now the services are available through Right Click menu of selected text