Introducing GMtranslator for Firefox

This is a tool that translates text on webpages.

It's something I imagined soon after the Google AJAX Language API was announced, and built slowly using bits and pieces of my free time. The process taught me a lot about Greasemonkey, Firebug, and JQuery.

Installation

  1. Get Firefox.
  2. Get Greasemonkey.
  3. Get GMtranslator.

What it Does

This script puts a small box in the bottom corner of your Firefox window showing you a list of languages to choose from. Click on a language, then click on some text to see it's translated form - without leaving the page, and without copying and pasting anything.

The text you click on can be in any language - you don't need to specify the source because the Google Language API can usually detect it automatically. Larger amounts of text give Google a better chance to discern the language.

Foreign newspapers like Spain's El País, and Yomiuri Online, the Japanese newspaper with the largest circulation in the world, are always interesting places to find pages to translate to English. There is also a lot of Japanese activity in the embedded Linux space. I like being able to follow prolific Dutch and German Twitterers, and you can always find more at TwitterVision.

UI Flaws

I would like the dialog to animate out of the side of the viewport when it's hovered. And it also needs a throbber while it waits for the translated text from Google. But I couldn't get any JQuery animate() effects to work from within a GM script. Leave your suggestions in comments, or feel free to send me a patch.

What Next?

Although English is my first language, sometimes I want to translate things to Portuguese for my practice and amusement. I suspect this is pretty uncommon. So should there be some way of choosing your destination language once, then using it always, instead of having to choose from the whole list every time?

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options