Magento Forum

Google - Website Translator Gadget
 
r2rsquared
Jr. Member
 
Total Posts:  30
Joined:  2008-10-16
Lake Oswego, OR
 

Google just released a “website translator gadget”.  I would be interested in getting ideas regarding the best approach to incorporate this feature into my Magento website.

Today, we’re happy to announce a new website translator gadget powered by Google Translate that enables you to make your site’s content available in 51 languages. Now, when people visit your page, if their language (as determined by their browser settings) is different than the language of your page, they’ll be prompted to automatically translate the page into their own language. If the visitor’s language is the same as the language of your page, no translation banner will appear.

The Google product announcement and detailed description of the “website translator gadget” features can be found here:
http://googleblog.blogspot.com/2009/09/translate-your-website-with-google.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnneLise
Sr. Member
 
Avatar
Total Posts:  154
Joined:  2008-09-08
Bergen, Norway
 

I would like this too!!  Any developers out there with some free time who can make a magento extension for this?? grin

//Lise

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

you don’t need a plugin for that. Just add this code:

<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>
anyware you want in any phtml pages.
But be careful. The translations is far from perfect.
 
Magento Community Magento Community
Magento Community
Magento Community
 
dipali
Jr. Member
 
Total Posts:  4
Joined:  2010-09-20
 

What are the limitation of using this google translation through .phtml code?
Any character limitation? will it affect any other ajax call inside website/page?
If my site is in 2 languages , Is it better to use language packs for trasnlation tha this method?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tz318000
Jr. Member
 
Total Posts:  16
Joined:  2011-03-12
 

After optimized google translate code, the code as blow:
frontend view http://www.hotsshop.com

<div id="google_translate_element">
      <
style>
         .
goog-te-combo{width145px !important;}
         
.goog-te-balloon-frame{displaynone !important;}
         font{background
transparent !important;}
         a font
:hover{ color:  !important;}
         
#google_translate_element{height: 22px !important;overflow: hidden !important;}
         
.goog-te-banner-frame{displaynone !important;}
         body{top
0px !important;}
     
</style>
     </
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>
 
Magento Community Magento Community
Magento Community
Magento Community
 
geetika123
Jr. Member
 
Total Posts:  1
Joined:  2013-01-13
 

this is not working with Mozilla browser . Is there any solution for that

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top