• ekajuan

    (@ekajuan)


    Hai Virtue teams,

    I have a bit problem with virtue theme translation. Currently
    I use a child theme and for the translation I use codestyling localization plugin.

    I have figured it out how to translate a child theme. But there’s still one problem with the word “Your Cart” at the topbar. I have translated it to “Troli Anda” (Indonesia). For a moment it looks like it works but then when the page has finished loading, the words revert back to “Your Cart.”

    How to solve this?

    Thank You

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Ben Ritner – Kadence WP

    (@britner)

    Clear the caching by adding something to cart, it should force it to work.

    Kadence Themes

    Thread Starter ekajuan

    (@ekajuan)

    Mm…It still behave the same.
    Maybe you can please take a look at my shop: http://feju-fashion.com
    and see what I mean.

    Theme Author Ben Ritner – Kadence WP

    (@britner)

    hmm yeah strange… might be something with the plugin.. try just opening the file lib/custom-woocommerce.php

    Scroll to the bottom and change the text on line 96

    Kadence Themes

    Thread Starter ekajuan

    (@ekajuan)

    Based on your hint I found out that there are two files affecting “Your Cart”, they are:
    1. templates/header.php
    2. lib/custom-woocommerce.php

    The code that I found on both place:
    <?php _e(‘Your Cart’, ‘virtue’);?> – <?php echo $woocommerce->cart->get_cart_total(); ?>

    So my child-theme translation actually takes effect on the header.php, which is the first phase.
    Your suggestion/modification takes effect on the second phase.

    My next big question, why having this piece of code in two seperate files, which fires up in sequence?

    Theme Author Ben Ritner – Kadence WP

    (@britner)

    Because of ajax, the function fires when you add an item to cart with ajax. You need both for ajax updating to work.
    Either way they are both on the same text domain so I don’t know why one translation is taking effect and the other isn’t.
    Kadence Themes

    mdevathaire

    (@mdevathaire)

    I have a similar issue with the ‘View Cart’ button which is not translated.
    I use Virtue latest version 2.4.6 and Polylang.
    Working in French, After ordering a product I would expect to see ‘Voir Panier’ or something similar and I see ‘View Cart’.
    I could not find where I can change this.
    Rgds, Michel

    mdevathaire

    (@mdevathaire)

    I found where I can change the ‘View Cart’ text, although it does not fix the translation bug this allows a “manual” translation:
    In wp-content/plugins/woocommerce/includes/wc-cart-functions.php line 91 (and line 79 for “succesfully added…”)

    Theme Author Ben Ritner – Kadence WP

    (@britner)

    mdevathaire, On what page?

    Do you have a french translation file for woocommerce? have you updated the theme french translation files to include all the strings you need?

    Kadence Themes

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘"Your Cart" Translation Problem’ is closed to new replies.