CMS Development

TaylorLioy
参加者

Google Translate added to HS site

解決

I'm trying to add the google translate language switch to my HS site. I added this code snipped (generated from google translate) to the site header and it saved just fine. But the issue is the google translate widget is not showing up on my site. It should be displaying in the bottom left corner. I've given it about an hour to populate on the live site, and still no luck. Any ideas what I'm doing wrong? Thank you in advance!

 

Here's the code snipped I added to the site header:

<script>window.gtranslateSettings = {"default_language":"en","native_language_names":true,"wrapper_selector":".gtranslate_wrapper"};</script><script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>

0 いいね!
1件の承認済みベストアンサー
DilionSmith
解決策
参加者

Google Translate added to HS site

解決

Hey Taylor,

There could be multiple reasons why the widget is not showing up.

First I would try opening the page in an incongnito browser and see if its just a browser cache issue.

Second thing you could do is remove 'wrapper_selector' from the code, this will make the widget load in a default position.

Here's an updated code snippet:

<script>
  window.gtranslateSettings = {
    "default_language": "en",
    "native_language_names": true
  };
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>

元の投稿で解決策を見る

0 いいね!
1件の返信
DilionSmith
解決策
参加者

Google Translate added to HS site

解決

Hey Taylor,

There could be multiple reasons why the widget is not showing up.

First I would try opening the page in an incongnito browser and see if its just a browser cache issue.

Second thing you could do is remove 'wrapper_selector' from the code, this will make the widget load in a default position.

Here's an updated code snippet:

<script>
  window.gtranslateSettings = {
    "default_language": "en",
    "native_language_names": true
  };
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
0 いいね!