jTextTranslate: A jQuery Translation Plugin

Development November 30, 2009 by cody 8 Comments

jTextTranslate copy

The double-click functionality in the New York Times was somehow fascinating but also highly discussed because it boldly used the browser functionality to get the definitions of words. Fortunately, the double click now causes not an immediate popout to appear but lets the user confirm by showing an interrogation mark.

This inspired me to create a new jQuery plugin for translating text. Imagine, how users that don’t have English as their first language could profit from an integrated functionality to translate e.g. an article.

The plugin works with the Google Language API and can be used to translate a text in all the languages provided by the API.

You can call the plugin like this:

$(element).translate()

And you can configure the plugin in the following way:

  1. original: the language shortage of the initial language (default is “en”)
  2. notfound: the message shown when no translation was found
  3. title: The title of the translation overlay
  4. firstOptionText: the text shown as first option in the languages drop down

Try the demoDownload jTextTranslate

Tagged with: , , ,

Discussion8 Join the discussion

Follow this discussion

Trackbacks

Join the discussion