Home Forums Basel support forum Edit pop up: PRODUCT WAS SUCCESSFULLY ADDED TO YOUR CART.

Edit pop up: PRODUCT WAS SUCCESSFULLY ADDED TO YOUR CART.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7140

    Estefania
    Participant

    Hi again!
    I know this topic is closed, but I need some more help with it.
    I have changed PRODUCT WAS SUCCESSFULLY ADDED TO YOUR CART to PRODUCT WAS SUCCESSFULLY ADDED TO YOUR SHOPPING CART, and also VIEW CART to VIEW SHOPPING BAG, by modifying these text strings in the file basel\functions.php.

    $translations = array(
    ‘adding_to_cart’ => esc_html__(‘Processing’, ‘basel’),
    ‘added_to_cart’ => esc_html__(‘
    Product was successfully added to your Shopping bag.’, ‘basel’),
    ‘continue_shopping’ => esc_html__(‘Continue shopping’, ‘basel’),
    ‘view_cart’ => esc_html__(‘View Shopping bag‘, ‘basel’),
    Questions:

    1- May I modify this string in child theme in order not to loose changes when update theme?

    2- I need to translate them to spanish by using WPML, but the strings are not recognize.

    Please, can you tell me how can I do that?

    Thanks a lot in advance!
    Estefanía.

    #7145

    Artem Temos
    Keymaster

    Hi,

    We suggest you not to edit them via functions.php but instead translate them via POT file. Here is a video that demonstrates how to translate strings with Loco Translate plugin https://www.youtube.com/watch?v=tAFq1yTfWfU

    Regards

    #7161

    Estefania
    Participant

    Thanks for your quick reply!
    I am sorry, but I think I did not explain well.
    I have installed in my theme de WPML plugin, but when I have changed this:
    $translations = array(
    ‘adding_to_cart’ => esc_html__(‘Processing’, ‘basel’),
    ‘added_to_cart’ => esc_html__(‘Product was successfully added to your Shopping bag.’, ‘basel’),
    ‘continue_shopping’ => esc_html__(‘Continue shopping’, ‘basel’),
    ‘view_cart’ => esc_html__(‘View Shopping bag‘, ‘basel’),

    in the function.php, as you recommended in another topic, this string is not recognized by WMPL.
    The string found is View Cart instead View Shopping bag, and if I translate it, the translation is not effective.

    What about the points 1 and 2 from the previous chat? 🙂
    Thanks!!!
    Estefanía.

    #7173

    Artem Temos
    Keymaster

    If you are going to translate these strings to another language with WPML than you don’t need to edit them in functions.php. Simply translate it with Loco Translate or with WMPL itself.

    1. It is not necessary to edit the file at all.

    2. Don’t change the file and then they will be available for translations. 🙂

    #7196

    Estefania
    Participant

    Hi again!
    I think I am not explaining well…..

    1- I want to change the word CART to SHOPPING CART
    This is not a translation to another language, it is just to modify terms in order to make them more “friendly”.

    2- After modify that word (CART to SHOPPING BAG), I need to translate it into spanish.

    I hope you can understand me now….
    Estefanía.

    #7198

    Artem Temos
    Keymaster

    Hello,

    We understand you. And actually, the processes of translation and editing are actually the same. You can simply “translate/edit” strings with WPML or Loco Translate for both languages. It is the only one way to change CART to SHOPPING CART and then be able to translate it.

    #7204

    Estefania
    Participant

    Thanks a lot!!!!
    I will try again!
    Best regards and nice weekend!
    Estefanía.

    #7214

    Artem Temos
    Keymaster

    Thank you, have a nice weekend too!

Viewing 8 posts - 1 through 8 (of 8 total)