Translation problem with shop

Hi,

I got some problems with the traduction on my website,

  • In The " Research" mode
    I wanted to translate 'Type and press “enter” by “Rechercher un produit”

  • In the Menu (if it is at this place)
    I want to translate The x ‘Items’ by x “Objets”

  • On the article page
    Translate " Leave a comment " by " Laisser un commentaire "
    And translate the “Submit button”

  • In the “Panier” page
    Translate the “Apply coupon” by Utiliser un coupon

  • In the boutique page
    Translate the “related products” by “Autres produits”

How to resolve it ?

Thanks and have a good day.

Hi There,

Please take a look at this article:

If that doesn’t work, you can also translate those words using gettext. You can add the code below in your child theme’s functions.php file.

function custom_text_translate($translated) { 
  $translated = str_ireplace('Leave a Comment', 'Laisser un commentaire', $translated);
  $translated = str_ireplace('Submit', 'Submit', $translated); 
  $translated = str_ireplace('Related Products', 'Autres produits', $translated);  
  $translated = str_ireplace('Type and Press “enter” to Search', 'Rechercher un produit', $translated);  
  $translated = str_ireplace('Apply Coupon', 'Utiliser un coupon', $translated);
  return $translated; 
}
add_filter('gettext', 'custom_text_translate' );

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.