Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1317241
    artio01
    Participant

    Hi guys,

    Currently I have a problem regarding the translation of “the shop” title with WPML. I use the title also for the breadcrumb. WPML can not find the appropriate string. I use the integrity stack and I couldn’t find any solution on this forum. Can you help me with that?

    Thank you,
    Ionut

    #1317356
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Please refer to the following thread (https://community.theme.co/forums/topic/translation-shop-title-with-wpml/).

    Hope that helps.

    #1317359
    artio01
    Participant

    I’ve checked that thread but in woocommerce.php of Integrity I don’t have a <h1 class=”entry-title”> line.

    Thanks,
    Ionut

    #1317737
    Nabeel A
    Moderator

    Hi Ionut,

    Can you please provide the URL of your site so we can take a look at your current setup?

    Thanks!

    #1318510
    artio01
    Participant
    This reply has been marked as private.
    #1318531
    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the url of the sites. You can manually add the Shop text for both the title and breadcrumb. Simply please insert this following code in your child theme’s functions.php file since you already have your child theme active and ready.

    // Translate "Shop"
    // =============================================================================
    add_filter('gettext', 'translate_shop_text' );
    function translate_shop_text($translated) { 
      $translated = str_ireplace('Shop', 'your translation', $translated);
      return $translated; 
    }
    // =============================================================================

    Please let us know if this works out for you.

    #1318699
    artio01
    Participant

    Hello,

    Unfortunately this code doesn’t work, at least for Integrity stack and I’m not using any caching plugin. Anyway, is there any possibility to use WPML for this?

    Thanks,
    Ionut

    #1319486
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1320034
    artio01
    Participant
    This reply has been marked as private.
    #1320485
    Rad
    Moderator

    Hi there,

    It’s not translatable since it’s saved on the database, the only translatable strings are the static one. Please add this code to your child theme’s functions.php

    add_filter('x_option_x_integrity_shop_title', 'translate_shop_title');
    
    function translate_shop_title ( $title ) {
    
    switch( ICL_LANGUAGE_CODE ) {
    
    case "fr": $title = 'Magazin'; break;
    
    default: $title = 'Shop'; break;
    
    }
    
    return $title;
    
    }

    Hope this helps.

    #1321014
    artio01
    Participant

    Hello,

    The new code is working.

    Thanks,
    Ionut

    #1321034
    Christian
    Moderator

    You’re welcome.

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