• Theme= Evision corporate

    Is there anyone that can explain in a simple way what I should do to give the button “Know more” a different name like “Lees meer”?

    Is it with .po and .mo files?
    Is it with WPML?
    Is it in functions.php a have to add a function?
    I’ve read a lot but don’t know the best and easiest way to do.

    Can anyone help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter veerlevw

    (@veerlevw)

    I found this
    https://wordpress.org/support/topic/know-more-button?replies=3

    But I wonder if I had to put it into the functions.php or somewhere else?
    Can I make a child of my function.php ? How do I do this for the best?

    add_filter( ‘gettext’, ‘theme_change_comment_field_names’, 20, 3 );
    function theme_change_comment_field_names( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case ‘Know more’ :

    $translated_text = __( ‘Lees meer’, ‘theme_text_domain’ );
    break;
    }
    return $translated_text;
    }

    Thread Starter veerlevw

    (@veerlevw)

    I copied the functions.php and put the code above at the top but it doesn’t work.
    HTTP 500-fout

    Thread Starter veerlevw

    (@veerlevw)

    Ok I found a solution. Make a function.php with this code.
    But I would like to test on language – I will put the question in my case.

    <?php
    // Veranderen van de foeilelijke footer tekst
    add_filter( ‘gettext’, ‘theme_change_comment_field_names’, 20, 3 );
    function theme_change_comment_field_names( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
    case ‘Met trots ondersteund door %s’ :
    $translated_text = __( ‘Proudly powered by %s’, ‘theme_text_domain’ );
    break;
    case ‘Know more’ :
    $translated_text = __( ‘Lees verder’, ‘theme_text_domain’ );
    break;
    }
    return $translated_text;
    }

    ?>

    Thread Starter veerlevw

    (@veerlevw)

    how can I test on language switcher of POLYLANG?
    if language is ‘FR’ then there should be another text in place of ‘Lees verder’.

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

The topic ‘Polylang doesn't translate button 'Know more"’ is closed to new replies.