- This topic has 4 replies, 2 voices, and was last updated 7 years, 10 months ago by stefanp44.
- AuthorPosts
- March 23, 2017 at 11:52 pm #2525stefanp44Participant
Hi,
I’m trying to translate the home sections using the WPML plugin and I’m having a hard time doing it, especially the counter section. I can’t find any of the terms in the “string translation”. Could you help me there ?
Thanks
March 24, 2017 at 8:58 pm #2556HashKeymasterHi,
The theme is not totally compatible with WMPL plugin. The strings added via customizer panel are not translatable.
March 25, 2017 at 12:44 am #2578stefanp44ParticipantHi,
Thanks for your answer.
Perhaps I could adjust it directly in the template of my child theme, tweaking those two lines:
$total_counter_title = get_theme_mod(‘total_counter_title’.$i);
<h3 class=”ht-counter-title”><?php echo esc_html($total_counter_title); ?></h3>and adjusting them with conditions:
if language is german, then …Would you have any hint regarding this ?
April 3, 2017 at 10:34 pm #2669HashKeymasterIt requires some complex setting. Please check this tutorial if you are interested https://wpml.org/documentation/support/language-configuration-files/
April 4, 2017 at 1:19 am #2688stefanp44ParticipantHi,
Thanks for your answer. I found another solution : as I alone will edit the website, I hard coded the variables straight into my child theme. As you can see below, if it’s English then the variables are, else if it’s German, the variables are … Works too ! đ
if(ICL_LANGUAGE_CODE=='en') : $total_counter_title = array ('', 'countries', 'satisfied customers', 'worldwide projects', 'installed kilometers'); if(ICL_LANGUAGE_CODE=='de') : $total_counter_title = array ... endif;
- AuthorPosts
- You must be logged in to reply to this topic.