linuxututs
01-01-2010, 10:00 PM
Google's website translator
Translate your website with Google: Expand your audience globally
Live Demo: LinuxTuts (http://www.linuxtuts.net/forum/)
This is straight from google and is nothing compared to "NLP-er's (https://vborg.vbsupport.ru/showthread.php?t=220886)" 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.
<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.
<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.
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1
and
http://code.google.com/apis/ajaxlanguage/documentation/#TransliterationApiLoading
Translate your website with Google: Expand your audience globally
Live Demo: LinuxTuts (http://www.linuxtuts.net/forum/)
This is straight from google and is nothing compared to "NLP-er's (https://vborg.vbsupport.ru/showthread.php?t=220886)" 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.
<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.
<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.
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1
and
http://code.google.com/apis/ajaxlanguage/documentation/#TransliterationApiLoading