Anthony
Anthony

Reputation: 4050

Google Translate on WordPress(.com)

Since scripts are not allowed on WordPress(.com) blogs, I was wondering whether there is a way to get the following Google Translate code to work on a WordPress (.com) blog via the Text widget? Thanks in advance.

<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>

Upvotes: 1

Views: 1638

Answers (2)

Conrad
Conrad

Reputation: 1

You're making it too complicated -- you can just use html. Color coded explanation with a little story here:

http://conradcook.wordpress.com/2012/07/21/machine-translation-fail/

Upvotes: 0

markratledge
markratledge

Reputation: 17561

You can't run most JS on wordpress.com, but there seems to be a workaround to use Google Translate: http://en.forums.wordpress.com/topic/translation-widget?replies=20

Upvotes: 2

Related Questions