Q Google Translate

Discussion in 'Modifications' started by kirrikirri, May 23, 2012.

  1. kirrikirri

    kirrikirri New Member

    Joined:
    May 20, 2012
    Messages:
    4
    Likes Received:
    0
    Make it simple for yourself and your customers. Instead of translating for hours; take it the easiest way. Please a Google Translate box.

    Copy following code in your navigation, on the place you want. We have placed it in the mainnavigation of the WBColors theme, file : global_header.tpl:

    <div id="google_translate_element" align="center"></div>
    <script type="text/javascript">
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({
    pageLanguage: 'auto',
    autoDisplay: false,
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element');
    }
    </script>
    <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>



    If you want to place the text Google Translate above, the code is

    <div class="box">
    <div class="box-heading">Google Translate</div>
    <div class="box-content">
    <div id="google_translate_element" align="center"></div>
    <script type="text/javascript">
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({
    pageLanguage: 'auto',
    autoDisplay: false,
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element');
    }
    </script>
    <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    </div>
    </div>



    Example : onlineauctioneers.be
     
  2. Guest

    Guest Guest

    nice work
    tried using Danish language on your site,
    then i wanted to see the original page again,how can i do that ?
     
  3. Rupert Avery

    Rupert Avery New Member

    Joined:
    Nov 24, 2011
    Messages:
    157
    Likes Received:
    4
    I got this added a few days ago assuming it is the little drop down menu?

    If it is I found that having it in my Header cause the site to jump as it loads So i added it to my footer.. But is does save a lot of time!
     
  4. scodal

    scodal New Member

    Joined:
    Oct 23, 2012
    Messages:
    11
    Likes Received:
    0
    It is weird and a bit annoying how Google Translate always shows up waaay after the rest of the page loads. But, a great tool regardless.
     

Share This Page