Zerif Lite Polylang Translation success, except for team widget.
-
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.
- The topic ‘Zerif Lite Polylang Translation success, except for team widget.’ is closed to new replies.