Back to vBulletin 4.x Add-ons

Google's website translator
Mod Version: 1.00, by linuxututs

vB Version: 4.0.0 Rating: (3 votes - 4.67 average) Installs: 19
Released: 02 Jan 2010 Last Update: Never Downloads: 0
Not Supported Template Edits  

Google's website translator

Translate your website with Google: Expand your audience globally

Live Demo: http://www.linuxtuts.net/forum/

This is straight from google and is nothing compared to "NLP-er's" translator Mod for 3.8x version of vBulletin.

But if you're like me and had That translator Mod installed and have people from different parts of the world already visiting your website, you have to do something while That Mod is getting upgraded.

Here's How...

1) Copy/paste this code into the bottom of your "header" template.

PHP Code:
<div align="right">
<
div id="google_translate_element"></div><script>
function 
googleTranslateElementInit() {
  new 
google.translate.TranslateElement({
    
pageLanguage'en'
  
}, 'google_translate_element');
}
</
script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</
div
2) Here's the official API code from google to put into your "headinclude" template.
Including the Transliteration API on Your Page

AJAX Transliteration API is packaged under the "elements" module. To include the Google Transliteration API in your page, first you need the Google AJAX APIs script tag:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

This script tag will load the google.load function, which lets you load the individual Google APIs. For loading Google Transliteration API, calls to google.load look like this:

<script type="text/javascript">
google.load("elements", "1", {
packages: "transliteration"
});
</script>
That's a quote from google.

Here's the code again for you to copy/paste into your "headinclude" template.

PHP Code:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<
script type="text/javascript">
  
google.load("elements""1", {
      
packages"transliteration"
  
});
</
script
Mine worked without the API, but I figure this makes it load faster and work better.
I'm no programmer/coder, but I get by with my own few little hacks and just thought some of you might like this as well until something better comes along.

Official Google resources are Here.
Code:
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1
and
Code:
http://code.google.com/apis/ajaxlanguage/documentation/#TransliterationApiLoading

Download

No files for download.

Supporters / CoAuthors

  • google

Similar Mods

Mini Mods Block Google's CHROME-Browser vBulletin 3.8 Add-ons

vblts.ru supports vBulletin®, 2022-2024