rss

Wordpress Translation Plugin

(There is a similar easier-to-install Translator Widget, based on this one, for those unfamiliar with WordPress and/or PHP/HTML code - You’ll just need to upload the widget, and activate it from the control panel)

Dnghu.php is the very, very simple PHP script I am using used for this blog, which adds translations from and into most language pairs offered by Google, Altavista , InterTrans, Globe, Interpret and others. I prepared the first script to be able to report Indo-European Language for Europe and to make our Indo-European grammar available in any possible language through machine web translation.
Unlike other scripts, which are also Wordpress translator utilities, dnghu.php does not use flag images, it is probably the simplest possible script you can write to add this functionality, and it should be valid XHTML.

These are the scripts prepared for different language pairs, named “dnghu_ln_x.php”, where ln is the original language to translate from, and _x, which can be v, which stands for a vertical (sidebar) script (like the one in Indo-European), and h, for a horizontal one - like the one you can see in the header of this weblog. Other examples might be seen in the following sites: Indo-European languages, in Indo-European languages history and maps, Indo-European languages forum and Indo-European languages lessons.

NOTE. The Tranexp-only versions give limited outputs - please try them in other versions before asking for one in your language, as they might be worse than what you expected…

It works in Wordpress 2.0, 2.1, 2.2, 2.3 and 2.3.1; I haven’t tried it out in other versions.

Installation (you should know some basic HTML to deal with files, PHP is not necessary):

  1. Upload the dnghu_ln_x.php file to your plugins folder, usually wp-content/plugins/
  2. Activate the plugin on the Wordpress plugin screen.
  3. Go to the directory of your Wordpress theme, usually in wp-content/themes/ - if you haven’t selected a different one, it is the /default/
  4. Open the file where you want the script to appear, normally header.php (if you want it in the header), sidebar.php (if you want it in the sidebar) or footer.php
  5. Add <?php transdukete(); ?> exactly where you want the translation utility to appear within the part of the page you’ve already chosen

Download (v.1.0-1.2)

16/7/2007 - v. 1.21, From English, vertical, into most other pairs in Google, Altavista, InterTrans, Interpret and others: Wordpress English Translator

16/7/2007 - v. 1.21, From English, horizontal, into most other pairs in Google, Altavista, InterTrans, Interpret and others: Wordpress English Translator

21/6/2007 - From German, vertical, into some pairs of Google and Altavista: Wordpress Deutsch Übersetzer

21/6/2007 - From German, horizontal, into some pairs of Google and Altavista: Wordpress Deutsch Übersetzer

21/6/2007 - From French, vertical, into some pairs of Google and Altavista: Wordpress Traducteur Français

21/6/2007 - From French, horizontal, into some pairs of Google and Altavista: Wordpress Traducteur Français

24/12/2007 - v. 1.21, From Spanish, vertical, into some pairs of Google and Altavista (and also Catalan and Galician from Translendium): Wordpress Traductor Español

16/12/2007 - v. 1.21, From Spanish, horizontal, into some pairs of Google and Altavista (and also Catalan and Galician from Translendium): Wordpress Traductor Español

21/6/2007 - From Italian, vertical, into some pairs of Google and Altavista: Wordpress Traduttore Italiano

21/6/2007 - From Italian, horizontal, into some pairs of Google and Altavista: Wordpress Traduttore Italiano

21/6/2007 - From Portuguese, vertical, into some pairs of Google and Altavista: Wordpress Tradutor Português

21/6/2007 - From Portuguese, horizontal, into some pairs of Google and Altavista: Wordpress Tradutor Português

21/6/2007 - From Dutch, vertical, into some pairs of Google and Altavista: Wordpress Nederlands Vertaler

21/6/2007 - From Dutch, horizontal, into some pairs of Google and Altavista: Wordpress Nederlands Vertaler

Not-so-good translations (InterTrans only)

20/06/2007 - From Swedish, vertical, into some pairs of Tranexp: Wordpress Svenska Översätter

20/06/2007 - From Swedish, horizontal, into some pairs of Tranexp: Wordpress Svenska Översätter

Customizing:

If you know something about CSS you can open the file styles.css (in your theme directory) and add new declarations for the .div (and also the .ul in the vertical one) named “dnghu”.

Changes and other problems:

If you want other language pairs, or the whole code linking only to Altavista, Google, or even other web translators, or maybe ask a question or make a suggestion, contact me. There are a thousand possible combinations, and I simply cannot prepare them all in advance. You can find me in carlos [at] dnghu [dot] org

Licence

This code is licensed under the GNU GPL.