WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Google AJAX Translation

Add Google AJAX Translation to your blog. This plugin allows your readers to translate your blog posts, pages, or comments into 52 languages.

Operation and Customizing

  • Google Ajax Translation automatically detects your source language. If your source text changes to more than one language it can get confused.
  • Clicking the "powered by Google" link will take you to a full-page Google translation in your browser's preferred language. (This service will refuse to translate a page into the same language though, e.g. English to English.)
  • If your theme doesn't have a unique id for each post the plugin will fall back to translating just the content of the post but not the title, date, author, tags, etc. Try the plugin with the default theme (Kubrick) to see how it should work. If you need help modifying your theme just ask in the forums.
  • The CSS background-color of the popup can be specified in the format #5AF or #55AAFF or it can be copied from the body of the page.
  • To exclude certain posts and pages from displaying the "Translate" button put the post and page ID numbers into the field marked "Exclude posts and pages", for example 4, 5, 21. If you use permalinks you may not know your post and page ID's. The post or page ID is the number at the end of the URL when editing a post or page.
  • To exclude a section of a page from being translated enter a jQuery selector (which works just like a CSS selector) in the field marked "Do not translate". For example enter code to exclude the HTML code tag, enter .notranslate to exclude any element where class="notranslate", or enter code, .notranslate to exclude both. See this page for more information or ask any questions in the forums here.
  • Deleting the plugin from the Administration Panel (Plugins > Installed) also deletes the options from the wp_options table in the database.
  • Most formatting, font, color, etc. changes can be made in google-ajax-translation.css or you can override them with your own CSS file
  • The included ajax throbber is black on a white background. You can make your own at http://www.ajaxload.info/. 16 by 16 pixels works best.

Code

  • This plugin uses the Google AJAX Language API and the jquery-translate plugin.
  • The "[" and "]" characters in the "Translate" button can be changed in the variables $before_translate and $after_translate
  • The google-ajax-translation.js file is included for reference. It is minified and appended to the file jquery.translate-1.4.1.min.js
  • This plugin automatically uses the jQuery library supplied by your WordPress installation (version 1.3.2 as of April 2010). If your theme or another plugin has another copy of jQuery hard coded into it this plugin may not work.
  • This plugin places the popup and JavaScript into the footer with the wp_footer() function. If your theme doesn't have this function it will not work. See the footer.php file in the default theme to see what it should look like.
  • If you customize your theme you can position the "Translate" button anywhere within the WordPress loop as shown below:
<?php
if( method_exists( $GoogleTranslation, 'google_ajax_translate_button' ) ) {
    $GoogleTranslation -> google_ajax_translate_button();
}
?>

Requires: 2.8 or higher
Compatible up to: 2.9.2
Last Updated: 2010-5-13
Downloads: 117,241

Ratings

4 stars
4.1 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,1,1 100,4,4
100,4,4 100,1,1
100,3,3 100,1,1
100,8,8 100,1,1
100,12,12 50,4,2
38,8,3
82,11,9
100,3,3
0,1,0
100,3,3
90,10,9
0,1,0
100,1,1
14,7,1
100,1,1
22,9,2
0,4,0
0,19,0
0,3,0
0,1,0
0,1,0
0,2,0
0,1,0
0,1,0