Apr 11 2006

GG_Translate 0.1b

Published by at 11:30 am under GG_Translate

This is an old article and the information contained within it may be out of date, not reflect my current views and/or contain broken links. If you feel this article is still valid and requires updating, you can use the contact form to let me know. However, I make no guarantee that it will get updated.

GG_Translate is a WordPress plugin that provides site users with links to translate the blog into their own language.

The plugin detects which languages the users browser will accept and, if there are any which are different to the blogs published language, it will provide links to translations in those languages. For translations the plugin uses the Google and Altavista Babel translation engines, favouring the Babel engine over the Google engine. If no translations are available for a particular translation a link will not be provided.

Currently there is no administration panels for the plugin so configuration changes must be made in the source code, this will change in future versions.

The plugin provides two end users fucntions:


Takes no arguments are return true if translation links can be provided, otherwise false;

translate_links($message=’%to’, $before=”, $after=”, $display=-1)

Takes four options arguments (default values shown above):

  • $message: a string optionally container %to (language to translate to) and %from (language being translated from). The default is to just show the language being translated to
  • $before: string to be prepended before link, e.g. $lt;li>
  • $after: string to be appended to end of link, e.g. $lt;/li>
  • $display: number of translation link to show, or -1 to show all available

An instance of the GG_Translate class does not need to be created in order to use the functions. Simply enable the GG_Translate plugin and add GG_Translate::can_provide_links or GG_Translate::translate_link to your theme code files.

The latest version of the plugin can be downloaded from http://www.gringod.com/wp-upload/software/GG_Translate/GG_Translate.zip. The old versions can be downloaded using their full version number, e.g. the current version of the plugin can be downloaded from http://www.gringod.com/wp-upload/software/GG_Translate/GG_Translate_0.1.7.zip.

12 responses so far