Google Translate Widget

630 views
Skip to first unread message

Erica Preswood

unread,
Jan 10, 2022, 8:47:58 PM1/10/22
to Google Cloud Translation API
Our district completed the Google Translate widget request form for non-profits.  When we try to add the widget using the code that we received to our Google Site, the translate widget will not work; all that is added is the language selection box, but it doesn't translate anything.  Any assistance would be greatly appreciated. 

Carlos Clement Bellido

unread,
Jan 12, 2022, 10:31:16 AM1/12/22
to Google Cloud Translation API

Hi!


When you refer to the “widget”, do you mean the Translation API Markup? This documentation shows how to integrate Cloud Translation API in your site or application.

Erica Preswood

unread,
Jan 13, 2022, 12:51:36 PM1/13/22
to Google Cloud Translation API
This is the code that I was given by google to add to my school district's google site, 

<div id="google_translate_element"></div>

<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>

<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

When I add it to the site, it doesn't work. Any suggestions?


Samar Amara

unread,
Jan 13, 2022, 8:34:00 PM1/13/22
to Google Cloud Translation API
Hello,

It will be better to address your question to the Google Translate Community, since Google Groups are reserved for general product discussion on Google Cloud Platform-end products and not for reporting issues and feature requests. Find here the general guidelines for the Community Support resources
Reply all
Reply to author
Forward
0 new messages