New Landing How can we help? Cardinal Not all strings are in the theme PO file

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Cardinal
  • #152554
    BBMagnus
    Member
    Post count: 20

    Hi,

    I have used PO edit to complete the translation of the theme, but there are two things which do not work. See all products (attached picture) and part of the cart where it still stands “no items in the cart”. How do i change these two pieces? PO file attached as well.

    Kind regards,

    Magnus

    Attachments:
    You must be logged in to view attached files.
    #152597
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    <?php
    function sf_text_strings( $translated_text, $text, $domain ) {
    $translated_text = strtolower($translated_text);
    switch ( $translated_text ) {
    case 'no items in the cart' :
    //please change this text as you want to translate.
    $translated_text = __( 'no items in the cart', 'woocommerce' );
    break;
    
    case 'view all products' :
    //please change this text as you want to translate.
    $translated_text = __( 'view all products', 'woocommerce' );
    break;
    
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );
    ?>

    Thanks
    Mohammad

    #153451
    BBMagnus
    Member
    Post count: 20
    This reply has been marked as private.
    #153478
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Are you using a child theme? It needs to go in the functions.php file

    – Kyle

    #153503
    BBMagnus
    Member
    Post count: 20
    This reply has been marked as private.
    #153769
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That seems to be the fucntions.php of the parent theme.
    Inside the themeforest download zip there is a child theme .zip file

    Upload it, activate the child theme.

    Let us know if you can’t make it.

    -Rui

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register