Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1333340
    Marjolijn Z
    Participant

    Hi there,

    I tried to translate some of the default text of the theme, especially the text that is shown to visitors of my site. I followed your guide: https://community.theme.co/kb/translation/

    I created the .po and .mo files and put them in public_html/wp-content/languages/themes, because I don’t use a childtheme. I named them _x_-nl_NL.po and _x_-nl_NL.mo.

    But nothing happens. For instance, on http://www.marjolijnzegers.nl/inspiratie there is still the term Read more instead of the translation: Lees meer.

    I think I have to do another thing, but I don’t know what. Can you please help me?

    #1333468
    Christian
    Moderator

    Hey there,

    Your using a single underscore in _x_. Please use double underscore __x__

    Thanks.

    #1342777
    Marjolijn Z
    Participant

    tnx!! nice when solutions are so easy…

    #1342784
    Marjolijn Z
    Participant

    But… could it be that Read more is somewhere else defined? Because this term is not translated (and I checked the .po file, there I translated it.

    #1342877
    Paul R
    Moderator

    Hi,

    Please install and activate a child theme.

    https://community.theme.co/kb/how-to-setup-child-themes/

    Then add this in your child theme’s functions.php

    
    add_filter( 'gettext', 'x_translate_read_more', 9999, 3 );
    function x_translate_read_more( $translated, $text, $domain ) {    
    	if($text=='Read More' && ICL_LANGUAGE_CODE == 'nl' ) return 'Lees Verder';
    	else  return $translated;
    }
    

    Hope that helps

  • <script> jQuery(function($){ $("#no-reply-1333340 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>