How to add a translate button using widget

  • Unknown's avatar

    I tried using the google translate on my site. I followed the steps as described in google . But when I copy the code into a text box in my widgets it dont displat the translate button. only parts of the text from the code.

    The blog I need help with is: (visible only to logged in users)

  • Can you show me the code you are trying to use?

  • Unknown's avatar

    <meta name=”google-translate-customization” content=”6f7e2c89dcac8f2e-f325d27616e03bfe-gb8a08f891bab5d03-10″></meta>

    <div id=”google_translate_element”></div><script type=”text/javascript”>
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({pageLanguage: ‘no’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, ‘google_translate_element’);
    }
    </script><script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>

  • Unknown's avatar

    The meta tag it says is going before the </head> and the other div id is going in a text box in widgets it says…

  • I’m sorry, but that embed code will not work because do not allow certain tags on WordPress.com for security reasons including JavaScript, Flash, iframe, form, and input tags. These restrictions are in place to prevent any disruptions in service due to potentially malicious code.

    You can read more about this here:

    Code

  • Unknown's avatar

    I know I found another way an has marked this topic as resolved :)

  • The topic ‘How to add a translate button using widget’ is closed to new replies.