Home Forums Total Translating the home sections using WPML

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2525
    stefanp44
    Participant

    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

    #2556
    Hash
    Keymaster

    Hi,

    The theme is not totally compatible with WMPL plugin. The strings added via customizer panel are not translatable.

    #2578
    stefanp44
    Participant

    Hi,

    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 ?

    #2669
    Hash
    Keymaster

    It requires some complex setting. Please check this tutorial if you are interested https://wpml.org/documentation/support/language-configuration-files/

    #2688
    stefanp44
    Participant

    Hi,

    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;
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.