Automator service to translate selected word using Dictionary app

I try to create an Automator service that will open the Dictionary app and find there a translation of a selected word (e.g. on a webpage or in a document).

Here is what I have currently:

However, when I click my service in the context menu (e.g. Safari context menu), nothing happens. It seems I missed one or two steps before “Get Definition of Word” when creating it, but which ones?

john202307. My knowledge of Automator is essentially nonexistent, but perhaps you need some method to view the output of the dictionary. I couldn’t seem to find an Automator dialog action, but the following did work with a selection in Safari. The definition of the selected word was opened in a TextEdit document.

1 Like

Thanks a lot, peavine! Instead of TextEdit, we can use “Run AppleScript”:

on run {input, parameters}
	display dialog input
	return input
end run

What I don’t understand though is why display notification input instead of display dialog input doesn’t work.

1 Like

john202307. I tested your display dialog solution and it worked great. Display notification also worked for me.

BTW, if I change the Dictionary to Apple Dictionary the word “test” and other commonly used words are not found. I don’t know why that would be.

FWIW, a shortcut can be used with a quick action to get the definition of a selected word, but this loads the Dictionary app.

1 Like

Instead of Automator, why not just pass your pointer over the word you want to look up in the dictionary and press ctrl+cmd+D to open an in-place panel. Depending upon the dictionary languages you have configured in Apple dictionary’s Settings, these will appear top to bottom in that pop up look up dialog.

Screenshot 2025-03-10 at 2.04.01 PM

1 Like