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?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityFrom 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
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.
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());
});
});