• Raz

    (@razdavid)


    Hello,

    The website’s main language is English, when I switch to either Italian or German, the mini cart icon briefly translates into Italian or German, and after a moment switches back to English.
    I used Loco Translate to make sure that it’s properly translated. I also noticed another thing: when I switch to IT or DE, the decimal separator is a comma, which then after a moment switched back to a point, reflecting the EN requirements.
    Following the instructions in this post, I tried clearing the customer sessions and I used a plugin for removing all cache, however I still come across the same issue. I also noticed that Sigrid’s website has exactly the same issue now: the cart displays “Your Cart” for the Estonian version of the website as well. Is this perhaps caused by an update of one of the plugins involved?
    I’m using both Polylang and Hyyan WooCommerce Polylang Integration with Virtue theme and Woocommerce.

    Please let me know if you have any advice for me.

    -Raz

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey,
    woocommerce carts are held in “sessions” and with that the cart fragments. Once you do something to update the cart (like add a product) then that would update.

    So let’s say the user accesses your site directly to the English version, then switches to German, the cart will be using the session started when the customer got to your site so the English. But if that customer then adds a product to the cart the cart fragments for that session refresh and the language would update.

    Becuase of the way woocommerce keeps sessions and cart fragments I don’t know of any way around this. So if you have customers that will arrive frequently at your site in a language they do not prefer then I would suggest not using the mini cart. Instead just adding an icon for the cart with a link to it. That would clear confusion.

    For most multilingual sites the language is set for the visitor so this wouldn’t be much of an issue.

    I know WPML has an option to allow clearing of cart sessions/fragments when a user switches to another language: https://wpml.org/documentation/related-projects/woocommerce-multilingual/clearing-cart-contents-when-language-or-currency-change/

    so it’s possible Hyyan WooCommerce Polylang has some option like this as well you could check on.

    I hope that better clarifies and helps!

    Ben

    Thread Starter Raz

    (@razdavid)

    Hello Ben,

    Thank you for your answer.
    I tried adding products while using both Italian and German versions of the website. When I do that the cart briefly switches to the correct language and after a moment switches back to English.
    Moreover I tried using a newly installed browser, landing on the Italian homepage, still same issue.

    I tried simply adding the cart icon to the topbar, but it only redirects to a specific link and therefore to a specific language only.

    What puzzles me the most is that this was not an issue before: I started setting up this website with Virtue Theme, Woocommerce, Polylang, Hyyan WooCommerce integration and the cart in the topbar was being displayed in the correct language.
    After that at some point I mistakenly removed the style.css and functions.php files from the child theme and I came across some issues: I therefore decided to start from scratch, however now I come across this issue both on the new websites I created and on the initial one.

    Moreover, I tried installing Woocommerce with Storefront theme here (the default Woocommerce theme) and it presents the same issue: the cart is displayed in English and when I switch to a secondary language, there is no way to switch it to the correct language. Therefore I’m not sure this is an issue related to the theme: it seems it might be related to Woocommerce or to the Hyyan integration.

    I now added a menu to the website I mentioned in my question, so now you can visit the shop and try adding product to the cart.

    Please let me know if you have any further advise for me, I would very much appreciate.

    -Raz

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Virtue/Woocommerce: how to translate Your Cart and the hover text (2)’ is closed to new replies.