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.
- This topic has 7 replies, 2 voices, and was last updated 8 years, 3 months ago by
Artem Temos.
-
AuthorPosts
-
November 23, 2016 at 8:55 pm #7140
EstefaniaParticipantHi 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.November 23, 2016 at 9:14 pm #7145
Artem TemosKeymasterHi,
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
November 24, 2016 at 10:47 am #7161
EstefaniaParticipantThanks 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.November 24, 2016 at 4:45 pm #7173
Artem TemosKeymasterIf 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. 🙂
November 25, 2016 at 4:13 pm #7196
EstefaniaParticipantHi 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.November 25, 2016 at 4:57 pm #7198
Artem TemosKeymasterHello,
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.
November 25, 2016 at 5:55 pm #7204
EstefaniaParticipantThanks a lot!!!!
I will try again!
Best regards and nice weekend!
Estefanía.November 25, 2016 at 7:42 pm #7214
Artem TemosKeymasterThank you, have a nice weekend too!
-
AuthorPosts
- You must be logged in to create new topics. Login / Register