Jump to content

Google Translate code disappears on website when going from page to page

Recommended Posts

Hi there!
I have been working with this tutorial through Squarestylist for my client's website. Overall, it worked well, and I was able to customize it to make it look nice. 

However, I keep running into the issue where going from page to and the language selector disappears and the translation stops working. Sometimes if I refresh it starts working again, so I'm wondering if it's something to do with the caching.

I'm kind of at a loss as to why that would be. Does anyone have any insights as to why that could be happening?

Screenshot 2024-08-19 at 5.23.57 PM.png

Screenshot 2024-08-19 at 5.24.08 PM.png

Link to comment
  • Replies 3
  • Views 445
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

5 hours ago, tuanphan said:

I see your code missing a code

image.thumb.png.1aa5c56fa488732fde951073f340db41.png

You can use this code to top of Code Injection > Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>

 

Thank you for this!

I added it and tested it. It seems to fix it but only when I view the site in Safari. My Chrome browser is still having that issue. I'm assuming it must have something to do with the caching since if refreshes a few times it corrects itself. I'm working on indexing the pages, so I'm not 100% sure if that will help in the long run. But I'm not sure if there's anything else I might be missing.
 

Link to comment
On 8/20/2024 at 8:54 PM, ashlyleh said:

Thank you for this!

I added it and tested it. It seems to fix it but only when I view the site in Safari. My Chrome browser is still having that issue. I'm assuming it must have something to do with the caching since if refreshes a few times it corrects itself. I'm working on indexing the pages, so I'm not 100% sure if that will help in the long run. But I'm not sure if there's anything else I might be missing.
 

Maybe conflict between same jQuery link, you try remove this line from Code Injection Footer

image.thumb.png.5610d8be9f440f7021cbcef0f33577cb.png

 

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.