Tuesday, November 12, 2013

Adding Images to Wiktionary and Google Translate Extension

"Use it or lose it" -- that is what scientists have discovered about our brains. Is it true that because the online dictionary tools are so handy, people do not bother to memorize new words any more? It doesn't have to be like that. What if the dictionary can actually help you build your vocabulary?

A traditional dictionary may hardly help much on that purpose. How about a visual dictionary? The book Brain Rules (by John Medina) states that Text and oral presentations are not just less efficient than pictures for retaining certain types of information; they are way less efficient. If information is presented orally, people remember about 10 percent, tested 72 hours after exposure. That figure goes up to 65 percent if you add a picture. In another book Moonwalking With Einstein (by Joshua Foer), the memory athletes turn the boring things into vivid images to memorize them .

Inspired by these facts, images are added to version 7.0 of Wiktionary and Google Translate, the Firefox extension. Certainly not every word can be presented by an image. However, with the help of a search engine, we can almost always show some related images that can help us better understand and memorize the word.

In this version, we use the Google Custom Search Engine to get images. It is free for the first 100 searches per day. This should be enough for a regular use.

To enable this feature in Wiktionary and Google Translate, open the Options dialogue and select the Advanced tab. Enable the Show Images checkbox and fill in the Google API key and Custom Search Engine ID boxes. You need to get your own Google API key and Google Custom Search Engine ID (see below for the steps of getting them.)

Your Google API key and Custom Search Engine ID will not be encrypted when being stored with Firefox. Therefore, it is a good idea to use the dedicated pair of Google API key and Custom Search Engine ID for Wiktionary and Google Translate.

If you have already known how to get Google API key and Google Custom Search Engine ID, you can skip the following.

How to get a Google API key
  • Go to https://code.google.com/apis/console/
  • Click the "Create project ..." button. You will be brought to the page of All Services.
  • Find Custome Search API from the list and turn it by clicking the ON/OFF button.
  • Select API Access from the menu on the left side.
  • Click the "Create new Browser key ..." button. An API key will be generated and shown.
How to get a Custom Search Engine ID

There is a trick to generate a CSE ID for searching the whole Web. Please keep on reading.
  • Go to https://www.google.com/cse/
  • Click the Create a custom search engine button.
  • Enter www.example.com in the Site to search box. Click the CREATE button.
  • Find the item of Modify your search engine and click the Control Panel button.
  • On the Basics tab, scroll to the bottom. Find the Sites to search section and choose Search the entire web but emphasize included sites.
  • Click on the checkbox of the site www.example.com (which we entered earlier) and press the Delete button to remove it.
  • On the same page, above the Sites to search section, find the Details section and press the Search Engine ID button to get your CSE ID.
  • (As reminded by the first 3 comments below,) turn on the option of Image Search, which is near the middle of the Basics tab.


Mt said...

Is missing a step: Custom Search Engine Need to open the Image Search.

Very good feature.

Brooklyn Wyatt said...

you missed a step.At the last image search option should be turned on, otherwise images cannot be seen..

Thanx for the tutorial

Anonymous said...

I third the missing step mentioned by the two above. Please include that on the Custom Search Engine page, Image Search must be switched on.

Unknown said...

Since the google image search is deprecated, are there other options to use in the plugin?

Goorgle said...

Works perfectly, images are of great help, many thanks!

Anonymous said...

"Select API Access from the menu on the left side."

I can't find it, where is it exactly? Thanks.

Anonymous said...

worked for me (Firefox 35)

Anonymous said...

Thanks for your very nice add-on. I like your use of Wiktionary (my preferred online dictionary), the options you offer, and the way you display the results. However, I'd like to report 2 problems. First, I'm using Firefox version 45 and followed the instructions above for adding images to the results. However, now when I look up a word's definition, the 3 images that appear are just "broken image" placeholders, instead of images from Google Image Search. Second, I notice that when I have "aggressive mode" turned off, and I'm using Ctrl+Shift plus hovering to look up a word, I only get a result if I first hold down Ctrl+Shift and then move the mouse to the word, from another location. If I'm already on the word in question and simply push down Ctrl+Shift, I get no result at all -- the add-on does nothing. When I enable "aggressive mode", I do get a result if I'm already on the word and then push Ctrl+Shift. Thanks again for the nice piece of software.

Get This <