Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1141067
    maghrabi42
    Participant

    Hello,
    I need to translate the (return to shop) and (Your cart is currently empty)
    my website is najdstore.com
    thank you

    #1141068
    maghrabi42
    Participant

    attachment

    #1141081
    Christopher
    Moderator

    Hi there,

    Please follow this link https://community.theme.co/kb/translation and translate strings in x.pot file.

    Hope it helps.

    #1141172
    maghrabi42
    Participant

    Hello,
    i translate the pot file and uploaded by fz but nothing change on website
    thank you

    #1141206
    Christopher
    Moderator

    Hi there,

    Please provide us with FTP credentials.

    Thanks.

    #1141232
    maghrabi42
    Participant
    This reply has been marked as private.
    #1141249
    Christopher
    Moderator

    Hi there,

    I wasn’t able to connect to FTP due to following error :

    Error: Could not connect to server

    Please check.

    Thanks.

    #1153225
    Simon
    Participant

    The same thing for me.

    Your cart is currently empty. and return to shop can’t be translate with Poedit.

    I try to test :

    add_filter('gettext', 'x_translate_text' , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {
    	$translation = array (
    		'Your cart is currently empty.' => 'Votre panier est vide',
    		'Return To Shop' => 'Retourner à la boutique'
    	);
    
    	if( isset( $translation[$text] ) ) {
    		return $translation[$text];
    	}
    	return $translated_text;
    }

    It doesn’t work.
    An idea ?

    #1153357
    Thai
    Moderator

    Hi There,

    Please provide your admin account also.

    Thanks.

    #1153398
    Simon
    Participant
    This reply has been marked as private.
    #1153547
    Thai
    Moderator

    Hi There,

    Please try with this code instead:

    add_filter('gettext', 'x_translate_text' , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {
    	$translation = array (
    		'Your cart is currently empty.' => 'Votre panier est vide',
    		'Return To Shop' => 'Retourner à la boutique'
    	);
    
    	if( isset( $translation[$text] ) ) {
    		return $translation[$text];
    	}
    	return $translated_text;
    }

    Hope it helps 🙂

    #1154671
    Simon
    Participant

    Hi Thai,

    I tried this code found on a topic . But it does not work.

    Another idea ?
    Thanks
    Simon

    #1154719
    Christopher
    Moderator

    Hi there,

    Upon checking your site, string was translated successfully. Please see the attachment.

    I couldn’t find ‘Return to shop’ link, please provide us with the URL of page in question.

    Hope that helps.

    #1155029
    Simon
    Participant

    Yes but not on the cart page.

    #1155620
    Rad
    Moderator

    Hi there,

    I checked your site and that code isn’t added to your child theme’s functions.php

    Please add it and make sure to clear caches before testing.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1141067 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>