Passer au contenu Passer à la barre latérale

Marqué : 

Ce sujet contient 0 réponse, a 0 voix.

Dernière mise à jour par victorN-3 Il y a 3 mois et 2 semaines.

Assisté par: Waqas Bin Hasan.

Auteur Messages
mai 12, 2025 à 12:24 pm

victorN-3

Background of the issue:
I am trying to change the 'Add to cart' button text in my default language to 'WINKELWAGEN' instead of 'IN WINKELWAGEN' on my site lien caché. I added a code to my child theme's functions.php to register strings for translation with WPML. Here is the code: // Register strings for translation with WPML function register_custom_woocommerce_strings() { if (function_exists('wpml_register_single_string')) { wpml_register_single_string('woocommerce', 'WINKELWAGEN (Single)', 'WINKELWAGEN'); wpml_register_single_string('woocommerce', 'WINKELWAGEN (Archive)', 'WINKELWAGEN'); } } // Hook the registration function to the init action add_action('init', 'register_custom_woocommerce_strings');

Symptoms:
String translation is not finding 'WINKELWAGEN' to be able to translate it to English as 'ADD TO BASKET'.

Questions:
Why is the string translation not finding 'WINKELWAGEN'?
How can I translate 'WINKELWAGEN' to English as 'ADD TO BASKET'?

mai 12, 2025 à 1:08 pm