1

There's a translation service that takes the URL to be translated as part of the path, as follows:

http://ria.ru/some-article
http://translate.yandex.net/tr-url/ru-de.de/ria.ru/some-article

See how the source URL ends up at the end of the translation URL? Note the protocol part has to be omitted; if not, this could be mapped using a Firefox Quick Search.

Now I'd like to be able to do the translation with ease (say, hit F8). Yes, I could start doing the Add-On tutorial, and that would certainly provide me the means solve the problem. But there might be an easier way.

There's a similar question here.

1 Answer 1

1

Create a bookmarklet such as

javascript:(function(){location.href=location.href.replace(/.*?:\/\//,'http://translate.yandex.net/tr-url/ru-de.de/');}());

(tested in Chrome).

To make it respond to a key, you may need to use a keymapper such as AutoHotkey — see " Is it possible to bind a key combination to a bookmark in Firefox? "

2
  • FYI, my bookmarklet replaces all characters up to the first occurrence of "://" (i.e. non-greedy) with "http: //translate.yandex.net/tr-url/ru-de.de/" (space added to avoid linkifying) so works with other protocols: https, ftp etc. Just modify as needed :-)
    – Gnubie
    Aug 4, 2014 at 18:51
  • Thank you, it works perfectly! To make it respond to key, no keymapper extension is required, the built-in bookmark keymapper does the job. In the bookmark manager, simply assign a keyword (Schlüsselwort) to the bookmark (I chose yx), so typing yx in the address bar (replacing the current URL) will take you to the translation of the current URL.
    – Lumi
    Aug 5, 2014 at 8:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .