New Landing How can we help? Themeforest Theme Support Neighborhood Where to translate "No products found which match your selection."

Viewing 7 posts - 1 through 7 (of 7 total)
  • #67080
    oytamuah
    Member
    Post count: 81

    When I use the super search and there are no matching results I get the “No products found which match your selection.” error. I’m using WordPress Localization plugin – but it doesn’t show up anywhere as a string I can translate. Anyone know where we can translate this, even if its in a core file somewhere?

    #67211
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Please see the following:

    neighborhood/woocommerce/loop-shop.php:
       38  	<?php if ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
       39  
       40: 		<p><?php _e( 'No products found which match your selection.', 'woocommerce' ); ?></p>
       41  
       42  	<?php endif; ?>
    
    neighborhood/woocommerce/loop/no-products-found.php:
       12  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
       13  ?>
       14: <p class="woocommerce-info"><?php _e( 'No products found which match your selection.', 'woocommerce' ); ?></p>

    Hope this helps

    – Kyle

    #97020
    alemarengo
    Member
    Post count: 695

    Hi Kyle,
    is there any feasible way to translate it automatically?
    Neither CodeStyling Localization finds that string to translate, so… If I do that now, it will be lost within the next Woo update?
    Is there any add_filter function to add to child theme’s function.php?

    #97327
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    You need to translate using POEdit, see here: http://support.swiftideas.net/knowledgebase/how-to-translate-the-theme/

    – Kyle

    #97329
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

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

    function sf_text_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case 'No products found which match your selection.' :
    $translated_text = __( 'Your translated string', 'woocommerce' );
    break;
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );

    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #97832
    alemarengo
    Member
    Post count: 695

    Hi Kyle, thanks for your reply.
    Since I have already done what you suggested to me, but unsuccessfully, keep this in your mind for your next replies: if I ask a question in the forum, I have already tried the basic instructions you usually suggest to the rest of the forum’s users.
    Sorry to bother you with my questions, but Mohammad’s tricks is the right one because I didn’t find the correct string to translate. That’s why I asked for help. ๐Ÿ˜‰

    #97842
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    – Kyle

Viewing 7 posts - 1 through 7 (of 7 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