Here is a convenient way to get real Naver Papago translations for anything in your macOS computer. From any app, including Safari, Finder, Pages, Chrome, Mail, basically anywhere you can highlight text in macOS, you can get an immediate pop-up of Papago translation with a quick keyboard shortcut, no 3rd party apps needed.
Update Nov 2022:
This method uses the Automator app, which still works fine. But if you'd prefer to use the Shortcuts app, here's a newer updated post describing that:Original post continues below
Background
I've been playing around a lot lately with a MacBook and quickly realized the severe limitations of Safari with regards to extensions. I was spoiled by Chrome and the power of its extensions store. And of course, living in Korea, I value Chrome's built-in translation features for whole-page translation, and its translate extensions to translate highlighted words/text. Apple claims to offer a translator now but I've never seen a real Korean site it works on.
So I was looking for a way to bridge the gap and give me convenient quick translations, ideally anywhere in macOS. I tried a few 3rd party apps but found them all lacking.
Then I found that many people were making use of macOS "Services" to have semi-built-in Google Translation across the OS. I realized it would be easy to alter the URL in their code to utilize Naver's Papago translations instead of Google. And easy it was.
As a result, I can now highlight text pretty much anywhere in any app on macOS and with a simple keyboard shortcut get an immediate pop-up window translating it, as seen in the example above.
Here is how you can do it.
Create a Service in Automator to provide system-wide Papago translation pop-up
We will use a built-in feature of macOS called "Services" which are little utilities you can easily run from any app menu (and usually from right-clicking too). This part should be done manually but it's very easy.
Step 1: Create a new Automator service
Launch "Automator" (the app is already on your Mac) and the screen below will appear. Choose "Quick Action."
Step 2: Input the service
This will be done in just a few parts.
- In the search box on the left, type "Run Javascript" and double-click the result to add a Javascript box to the right-hand workflow.
- Type "Website Popup" in the same search box and double click that to add it to the workflow too.
- Ensure the menus above the workflow read: Workflow receives current [text] in [any application].
- Paste the following code into the Run JavaScript box:
function run(input) {
var output =
"https://papago.naver.com/?sl=ko&tk=en&st=" +
encodeURIComponent(input)
return output;
}
It should look like this:
Now give this project a name (like "Papago") and save. That should be it.
Step 3: Test it
Step 4: Create keyboard shortcut
You definitely do not want to have to go fishing through the Services menu each time you need a translation. So:
- Go to Settings -> Keyboard -> Services
- Find your Service name (for example, "Papago")
- Assign a keyboard shortcut to it. I chose Ctrl-P
- Enjoy.
I find this a very convenient way to get quick word or phrase translations anywhere in macOS.
Comments