• Resolved Changeit

    (@jennifer-je)


    Hi,

    I’ve managed to translate Zerif Lite.
    You can check it here https://nameless.pt
    I got stuck in the Team Section. I was able to translate the title (and subtitle) using .pll__ :

    EXAMPLE, REPLACED THIS:

    if( !empty($zerif_ourteam_title) ):
    echo ‘<h2 class=”dark-text”>’.__($zerif_ourteam_title,’zerif-lite’).'</h2>’;
    endif;

    WITH THIS:

    if( !empty($zerif_ourteam_title) ):
    echo ‘<h2 class=”dark-text”>’.pll__(‘zerif_ourteam_title’,’zerif-lite’).'</h2>’;
    endif;

    However, I am still struggling to translate the widget in our Team Section : Position and short description text (when hovering on team member profile picture).
    Is anyone able to help me with this? Will gladly share how I managed to translate the remaining front page sections ??

    Here is my code:

    our_team.php

    <?php
    echo ‘<section class=”our-team” id=”team”>’;
    echo ‘<div class=”container”>’;
    echo ‘<div class=”section-header”>’;
    $zerif_ourteam_title = get_theme_mod(‘zerif_ourteam_title’,__(‘YOUR TEAM’,’zerif-lite’));

    if( !empty($zerif_ourteam_title) ):
    echo ‘<h2 class=”dark-text”>’.pll__(‘zerif_ourteam_title’,’zerif-lite’).'</h2>’;
    endif;
    $zerif_ourteam_subtitle = get_theme_mod(‘zerif_ourteam_subtitle’,__(‘Prove that you have real people working for you, with some nice looking profile pictures and links to social media.’,’zerif-lite’));
    if( !empty($zerif_ourteam_subtitle) ):
    echo ‘<h6>’.pll__(‘zerif_ourteam_subtitle’,’zerif-lite’).'</h6>’;
    endif;
    echo ‘</div>’;

    if(is_active_sidebar( ‘sidebar-ourteam’ )):
    echo ‘<div class=”row” data-scrollreveal=”enter left after 0s over 0.1s”>’;
    dynamic_sidebar( ‘sidebar-ourteam’ );
    echo ‘</div> ‘;
    else:
    echo ‘<div class=”row” data-scrollreveal=”enter left after 0s over 0.1s”>’;
    the_widget( ‘zerif_team_widget’,’name=ASHLEY SIMMONS&position=Project Manager&description=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dapibus, eros at accumsan auctor, felis eros condimentum quam, non porttitor est urna vel neque&fb_link=#&tw_link=#&bh_link=#&db_link=#&ln_link=#&image_uri=’.get_template_directory_uri().’/images/team1.png’, array(‘before_widget’ => ”, ‘after_widget’ => ”) );
    the_widget( ‘zerif_team_widget’,’name=TIMOTHY SPRAY&position=Art Director&description=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dapibus, eros at accumsan auctor, felis eros condimentum quam, non porttitor est urna vel neque&fb_link=#&tw_link=#&bh_link=#&db_link=#&ln_link=#&image_uri=’.get_template_directory_uri().’/images/team2.png’, array(‘before_widget’ => ”, ‘after_widget’ => ”) );
    the_widget( ‘zerif_team_widget’,’name=TONYA GARCIA&position=Account Manager&description=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dapibus, eros at accumsan auctor, felis eros condimentum quam, non porttitor est urna vel neque&fb_link=#&tw_link=#&bh_link=#&db_link=#&ln_link=#&image_uri=’.get_template_directory_uri().’/images/team3.png’, array(‘before_widget’ => ”, ‘after_widget’ => ”) );
    the_widget( ‘zerif_team_widget’,’name=JASON LANE&position=Business Development&description=Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dapibus, eros at accumsan auctor, felis eros condimentum quam, non porttitor est urna vel neque&fb_link=#&tw_link=#&bh_link=#&db_link=#&ln_link=#&image_uri=’.get_template_directory_uri().’/images/team4.png’, array(‘before_widget’ => ”, ‘after_widget’ => ”) );
    echo ‘</div>’;
    endif;
    echo ‘</div>’;
    echo ‘</section>’;
    ?>

    I have also added these lines at the end of functions.php:

    // Our team translation
    pll_register_string(‘Our Team’,’zerif_ourteam_title’,’zerif-lite’);
    pll_register_string(‘Our Team’,’zerif_ourteam_subtitle’,’zerif-lite’);

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Alexandra

    (@alexandrastan001)

    Hello,

    Please check out this document: https://docs.themeisle.com/article/80-how-to-translate-zerif

    Best regards,
    Alexandra

    Hi,

    Same issue : I would like to translate the position and short description of the widget Team member but it is not available in polylang.

    And the link of Alexandra does not answer how to to it for that specific section of Our Team (of course it works for the title and subtitle but here we speak about position and short description).

    @Changit : If you have found a solution, I would be please to have it ??

    Thanks you

    Hi @admfj03,

    To translate the widgets, you need to follow this line from the document that Alexandra gave you:

    To translate the widgets you just need to create separate widgets for each language and you will get a button with the following text “The widget is displayed for:” and just select the language.

    Let me know if you manage to do this.

    Best regards,
    Rodica

    Ho rodicaelena,

    This is what I finally did and indeed it works.

    But I find it non consistent. Other widgets are translated via polylang and the table with all translation strings. It is good to have all the translation at one place. Here we duplicate the maintenance place. And it is very strange that this widget has to be managed like what you described and the testimonial widget is managed through the classic polylang table.

    Anyway, thanks for the answer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Zerif Lite Polylang Translation success, except for team widget.’ is closed to new replies.