Error when switching language on home page

Error when switching language on home page

itamaf
Shopify Partner
1 0 0

Hello,

When I use the language switcher to change the language on the homepage, I get an error and I don't know why.

This does not happen if I change the language on any other page. The problem is only on the homepage.

I am using "Translate and adapt"  and "CVC multi-currency converter".  You can change the language in the footer.

My store is  : planete-vintage.com

Reply 1 (1)

DaisyVo
Shopify Partner
4419 490 583

Hi @itamaf 

 

I’ve gone through your issue carefully, and I see that the language switcher error is only happening on your homepage, while it works fine on other pages. Since you're using the "Translate & Adapt" app along with "CVC Multi-Currency Converter", there might be a conflict between these two apps or a misconfiguration in how the homepage handles translations.

Possible Causes & Solutions:

1. Check for JavaScript Errors

Since the issue is only on the homepage, it’s likely that the language switcher is encountering an error in JavaScript. You can check this by:

  • Opening your homepage
  • Right-clicking anywhere and selecting Inspect
  • Going to the Console tab to see if any errors pop up when switching languages

If you see an error related to Translate & Adapt or CVC Multi-Currency Converter, try disabling one app temporarily and see if the issue persists.

2. Check Theme Code for Conflicts

If the switcher is located in the footer, it’s likely using Liquid or JavaScript to change languages. Try this:

  • Go to Online Store > Themes > Edit Code
  • Open footer.liquid and look for the language switcher code
  • Compare it with a Shopify default theme (like Dawn) to see if anything is missing

If the language switcher uses JavaScript, check if the homepage is missing the necessary script for switching languages. Sometimes, scripts are only loaded on specific pages instead of globally.

3. Force the Language Switcher to Work on All Pages

If the issue is related to how Shopify’s translation system reloads pages, try forcing the language switcher to reload the page properly. Add this JavaScript snippet inside theme.liquid (before </body> tag):

 

 
document.addEventListener("DOMContentLoaded", function() { document.querySelectorAll("[data-localization-form] select").forEach(function(el) { el.addEventListener("change", function() { location.reload(); // Forces a page refresh to apply changes }); }); });

This ensures that the switcher properly reloads the page when changing languages.

4. Check "Translate & Adapt" Settings

Go to Settings > Languages and verify if the homepage is properly translated. Sometimes, missing translations can break the switcher. If the homepage isn’t fully translated, try manually updating it in the Translate & Adapt app.

5. Test with a Default Shopify Theme

To check if the issue is caused by your theme, try switching to Dawn theme temporarily and see if the problem persists. If the switcher works fine there, then the issue is within your theme’s custom code.

Final Thoughts

If the issue still happens after checking these steps, it might be a deeper conflict between Translate & Adapt and CVC Multi-Currency Converter. Try disabling CVC Multi-Currency Converter temporarily and test the switcher again. If it works, you may need to reach out to the CVC app’s support to report the issue.

Let me know if any of these steps help or if you need further assistance!
Best regards,
Daisy.

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution