Single click Google Translate

If you live in a multi-culture environment, you likely need to use Google Translate almost eveyday. This could be the workflow you go through again and again:
copy the text to be translated>>open google translate>>paste the text on the left side>>choose the input language>>choose the output language

With the help of CHATGPT, I made bookmarks that reduce these workflow into one two steps:

copy the text to be translated>>click the right target language bookmark

Here I demonstrate how this method works in real time:

The structure of the bookmark url looks like this:

javascript:(async()=>{try{const t=await navigator.clipboard.readText();if(!t)return alert("Clipboard is empty!");location.href="https://translate.google.com/?sl=auto&tl=nl&text="+encodeURIComponent(t)}catch(e){alert("Failed to read from clipboard: "+e.message)}})();

It looks complex, but essentially you only need to change the bolded “nl” to country code of your target language. Then copy and paste this url to the url field of any bookmark. Change the bookmark name to anything remind you which target language this bookmark is for, then you get a single click google translate activator. Enjoy! Until next time!

Leave a comment

Your email address will not be published. Required fields are marked *