Tagged: x
-
AuthorPosts
-
January 17, 2017 at 5:30 am #1333340
Marjolijn ZParticipantHi 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?
January 17, 2017 at 7:26 am #1333468
ChristianModeratorHey there,
Your using a single underscore in
_x_. Please use double underscore__x__Thanks.
January 24, 2017 at 2:56 am #1342777
Marjolijn ZParticipanttnx!! nice when solutions are so easy…
January 24, 2017 at 2:59 am #1342784
Marjolijn ZParticipantBut… 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.
January 24, 2017 at 4:51 am #1342877
Paul RModeratorHi,
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
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1333340 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
