Current Version - 0.3
Release Date - 05/15/2009

The Script
Download the script.

Download the ttMakeKvtml.py program.

Overview
The general idea of this script simple: if you're to a moderate level in the acquisition of a foreign language but not yet fluent, you probably often find yourself stopping your train of thought to look up words in a dictionary, or perhaps you often just ignore a lot of words you don't know due to the tedium of looking them up. With this script you can use a free online dictionary to look up words as you read them. Just hover your mouse over the word you don't know and press F4. The script will query the online database and if there is a match it will display it in a tooltip above the word. This allows you to more smoothly read the text and can serve to increase your vocabulary.

In addition to this, all words looked up get stored in cookies which expire after 2 weeks. If you wish to practice the new vocabulary you are learning, you can do so by running the above program ttMakeKvtml (for Linux only so far). This program extracts the word data from the cookies and compiles it into a .kvtml file. This file format is a standard format for word lists and is the format used by KWordQuiz, a free flashcard program included with KDE.

Feedback
I am very interested in hearing from you if you use this script. Please email me at hielscher, the at sign, gmail, then a dot, then com and let me know how it works for you.
Technical Details
This is a Greasemonkey UserScript. Greasemonkey is a Firefox extension that allows users to write their own Javascript scripts that alter the behavior of websites to which they browse. Thus, both Firefox and Greasemonkey are necessary in order to run this script.
Installation Instructions
  • First, if you haven't already, install Firefox.
  • Next, you'll need to install Greasemonkey. You'll need to restart Firefox to activate Greasemonkey.
  • Next, you can install the script itself. You can either right-click this link and choose "Install User Script" or follow the link and on the page select in the menu "Tools" -> "Install This User Script". Keep the defaults unless you have a reason not to.
  • Go in the Firefox menu to "Tools" -> "User Script Commands" -> "Manage Dictionaries". The ToolTip Translation window should pop up. You'll need to fill in the source and destination languages which you want translated. Finally, fill in the groups of URLs on which you want to use this dictionary and then press the Update button to save your changes. If you change the language selections then either the text box for the URLs will be cleared out for you to add new websites or the previous values stored for that dictionary will be loaded for you to see. In order to specify a group of URLs on which to use a particular dictionary you can use the asterisk (*) character. E.g., in order to specify that you want to use the Dutch dictionary on all URLs whose top-level domain ends in .nl, enter Dutch in the source language and English in the destination language box, and then enter http*://*.nl/* as one of the lines in the Websites box and click the Update button to save. Separate all URL strings with a blank line.
  • In order to see your changes you'll need to refresh the pages you have open, and wait for them to fully load before using the script. From then on, if you are on a page whose URL you've configured to be matched by one of your specified dictionaries and you want to get a translation of a word, simply hover your mouse over the word and press F4. The first match will pop up above the word in a tooltip.