Sunday, January 9, 2011

Google Translation

I would like to share a Google Translate JavaScript plug-in.
To add a translation to your web pages you can use JavaScript and Google translate services.

Here is a sample that add a translate combo box to your page:
// define div tag where translation combobox will be placed
<div id="google_translate_element">

// define "new" translate element function  
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'uk',

    includedLanguages: 'et,tl',
  }, 'google_translate_element');

// add all necessary sources to do the translation 
<script src="//"></script>

- easy to use 
- using it you can create a copy of your blog/site to other languages 

- not all languages supported 
- engine itself is quite new and translation is not perfect

if you need translation to any language remove includedLanguages parameter

There are some useful links that may help you with building your copy:

No comments: