Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1292564
    Juneko
    Participant

    Hi my name is Junior from Brazil
    I made a online shop using X theme and only few texts are not translated to portuguese.
    for example the text “you may also like…” on related products still appears in english.

    Do you guys have any tips form me.

    Thank you.

    #1292701
    Christian
    Moderator

    Hey there,

    Please see https://community.theme.co/kb/translation/

    Thanks.

    #1298307
    Juneko
    Participant

    The theme is already translated, but only few phrases remains in english.
    is there a easy way to fix it or I still have to translate the whole x.pot file

    #1298439
    Thai
    Moderator

    Hi There,

    Please add the following code under functions.php file locates in your child theme:

    add_filter('gettext', 'x_translate_text' , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {
    	$translation = array (
    		'You may also like…' => 'Your text',
    	);
    
    	if( isset( $translation[$text] ) ) {
    		return $translation[$text];
    	}
    	return $translated_text;
    }

    Hope it helps 🙂

    #1300737
    Juneko
    Participant

    Work’s perfect!!!!
    Thank you very much!!!
    Merry Christmas and a Happy New Year 🙂

    #1300755
    Thai
    Moderator

    You’re most welcome 🙂

    Merry X’mas.

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