Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1302001
    ProductionMD1986
    Participant

    Hello, I was building a bilingual site and everything is going perfectly, but I don’t know how to make the header and the topbar content bilingual. In other guards, I don’t know how to make it switch autmatically to the proper language.

    http://produits-sante-shake-proteine.com/

    Thank you for your help.

    #1302169
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    In regards to language or translations, you can check the link below.

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

    Hope it helps.

    Let us know how it goes.

    Thanks.

    #1302776
    ProductionMD1986
    Participant

    Hello, thank you for the information, but it’s not exactly what I need.

    I would need to know if there’s a way as there is for the footer widget of my site to be bilingual. My footer widget has a language option (All languages, French, English), so I’m wondering if there’s something similar that can be applied to my header content (Logo, topbar, text next to my logo, etc), except for the menu, which is already bilingual.

    thnak you.

    #1303062
    Rad
    Moderator

    Hi there,

    That’s possible through custom coding. Although I can’t help with full customization, I can still provide some recommendation. I also checked and your header area is already customized which maybe makes it easier. What translation plugin you’re currently using?

    Please provide your admin and FTP login credentials in private reply. We can try some if() blocks.

    if( LANGUAGE_CODE == 'en' ) {
    
    }

    Thanks!

    #1303064
    ProductionMD1986
    Participant
    This reply has been marked as private.
    #1303069
    ProductionMD1986
    Participant

    Using Polylang and Hyyan Woocommerce Polylang Integration

    #1303072
    ProductionMD1986
    Participant

    Using Polylang and Hyyan Woocommerce Polylang Integration

    #1303074
    ProductionMD1986
    Participant

    For example, I wonder how to display this logo:

    http://produits-sante-shake-proteine.com/wp-content/uploads/2016/12/usana-quebec-logo_en.jpg

    in the english version.

    And this texte next to it : Usana products – Buy Usana in Quebec

    #1303355
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Since you have your child theme active and ready, please follow the following steps below:
    1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
    2] Insert the following code into that new file

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_BRAND.PHP
    // -----------------------------------------------------------------------------
    // Outputs the brand.
    // =============================================================================
    
    $site_name        = get_bloginfo( 'name' );
    $site_description = get_bloginfo( 'description' );
    $logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
    
    if ( get_locale() == 'en_US')  {
      $logo           = 'http://produits-sante-shake-proteine.com/wp-content/uploads/2016/12/usana-quebec-logo_en.jpg';
    }
    
    $site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';
    
    ?>
    
    <?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>
    
    <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>

    3] Save the file named as _brand.php
    4] Upload this file to your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/global/

    And to save your from trouble, I went ahead and did the steps above. Please do check your logo now.

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