4

I want to do this:

  • Select some text (in Chrome)
  • Press a keyboard shortcut
  • Get a translation of that text on the same page (some bubble with the translation or something)

Is there a way to do this?

2 Answers 2

1

From https://chrome.googleblog.com/2014/10/translate-web-pages-more-easily-with.html

When you're browsing the web, you might come across a page where some of the text is in a different language. With the new update to the Google Translate Chrome extension, you can translate just that piece of text, without worrying about the rest of the page.

Google Translate Extension for Google Chrome

The above extension could be configured to

  1. to show a inline button
  2. to show the translation popup
  3. to show nothing

but it doesn't include keyboard shortcuts.

I just found another extension that could help:

Shortkeys (Custom Keyboard Shortcuts) but I didn't figured out yet exactly how to use it with Google Translate.

2
  • That is the closest thing to what I was looking for. Although it's annoying to get pop-up for everything you select... I have a mouse with a button that is useless for me right now, but to which you can assign a key combination. I wanted to select some text, and then get translation on a click of that button
    – zorglub76
    Apr 27, 2016 at 14:44
  • Sorry, I posted and unfinished answer. Regarding Google Translate, I think that the referred chrome extension is what is available at this time but probably that could be used together with the Chrome shortcuts. Checkout support.google.com/chrome/answer/157179?hl=en. By the way, maybe this question should be migrated to Super User because a complete answer will require more about Chrome than about Google Translate.
    – Rubén
    Apr 27, 2016 at 14:52
0

I think - if you can type in javascript - you can install sth like "TamperMonkey" from Google Extensions. You will be able to run any js code on every page. So, you can run in it this:

$(function(){
$(document.body).bind('mouseup', function(e){
    var selection;
    
    if (window.getSelection) {
      selection = window.getSelection();
    } else if (document.selection) {
      selection = document.selection.createRange();
    }
    
    selection.toString() !== '' && window.open("https://translate.google.cz/?text="+selection.toString());
   });
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.