New English-Irish Dictionary
English-Irish Dictionary double-click plug-in

The English-Irish Dictionary Double-Click feature can be added to all of the pages on your website. The feature has been integrated on this page — try it yourself! Once implemented, users can double-click or select text on any page to see a translation in New English-Irish Dictionary.

A new window will open, displaying the translations in http://www.focloir.ie/

What do I need?

Installing our search box on your site requires the following:

  • ability to edit the HTML source of your web page
  • ability to load files to your server. These are JavaScript files that are required for the double-click feature.

What do I do?

Please follow the steps below to integrate the feature.

Step 1: Apply required JavaScript files
  1. download the following Javascript files
    • jquery.js : this is a famous JavaScript library; check if it is already used in your pages. If not, download the last minified version on http://jquery.com
    • dblclickTranslate.js : code that contains the doubleclick functionalities. Right click this link and 'save target as' to download.
      BY CLICKING HERE TO DOWNLOAD THIS SOFTWARE YOU AGREE TO THE TERMS OF THE FOLLOWING DISCLAIMER:
      THIS SOFTWARE IS SUPPLIED TO YOU BY FORAS NA GAEILGE WITHOUT ANY WARRANTIES OR GUARANTEES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
      FORAS NA GAEILGE SHALL NOT BE HELD LIABLE FOR ERRORS CONTAINED HEREIN, OR FOR LOST PROFITS, LOST OPPORTUNITIES, CONSEQUENTIAL OR INCIDENTAL DAMAGES INCURRED AS A RESULT OF THE OPERATION OF THIS SOFTWARE.
  2. Load the files to your server. It is common to place JavaScript files within a folder named "scripts" on the root directory of your site.
  3. Paste the following code in the head element of your web page. The following assumes that the JavaScript files are in a folder named "scripts" in the root directory. If not, please modify the path to the files.
Step 2: Call Javascript function from your HTML

This is achieved using 1 of the following methods:

  1. Replace the opening body tag in your page with this code
  2. Include the following script within the body element in your page

The code can be customised by editing the following parameters:

websiteUrl: The dictionary website address. Do not change this.

dictionary: The dictionary that will be searched. Do not change this.

showFirstEntry: If the value of this parameter is "true", the dictionary page displays first dictionary entry matching the word the word you double-click on. If the value ot this parameter is not set to "true" the dictionary page displays a search results list with matches of the word you double click on.

areaClass: The class name of the element in which the double click should be performed. Leave "null" to perform on the whole page.

maxAllowedWords: Maximum number of selected words to submit. Leave false for no limit.

Step 3 (optional): Explain feature to your site users

It is important to make your users aware of the double click feature. For example, you could include text reading "double click any word for its translation".

See all our English-Irish dictionary gadgets and plugins

Word of the Day
adjective: leamh, neamhbhlasta, támáilte