Salta la navigazione

Etichettato: 

Questo ticket contiene 0 risposta, ha 0 voci.

Ultimo aggiornamento da victorN-3 3 giorno, 5 ora fa.

Assistito da: Waqas Bin Hasan.

Autore Messaggi
Maggio 12, 2025 a 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 link nascosto. 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'?

Maggio 12, 2025 a 1:08 pm