Tagged: x
-
AuthorPosts
-
July 18, 2016 at 7:27 am #1091757
Ying-Fu LiParticipantHi,
I keep getting translation issues with X/WordPress. On this site: http://www.keyfactor.nl/inspiratie-blog-digital-projectmanager-pieter-kramer/ I have added my nl_NL.po file but still one word won’t get translated: ‘COMMENTS’ at the top of the post excerpt.
Yes, I know how to edit .po-files and done that. Yes, I tried several ‘solutions’ on the forum. The damn word is here to stay. Please help! 😉
Thanks guys!
July 18, 2016 at 7:43 am #1091785
LelyModeratorHello There,
Thanks for posting in and we’re sorry you’re having this issue. Please try adding the following code on your child theme’s functions.php file:
add_filter('gettext', 'translate_text' ); function translate_text($translated) { $translated = str_ireplace('Comment', 'Comment translation here', $translated); $translated = str_ireplace('Comments', "Comments translation here", $translated); return $translated; }Hope this helps.
July 18, 2016 at 9:51 am #1091937
Ying-Fu LiParticipantHi,
Sorry, nothing changed.
July 18, 2016 at 10:36 am #1092006
DarshanaModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
July 18, 2016 at 10:47 am #1092024
Ying-Fu LiParticipantThis reply has been marked as private.July 18, 2016 at 11:02 am #1092049
ThaiModeratorHi There,
I updated the provided code to this:
add_filter('ngettext', 'translate_text' ); function translate_text($translated) { $translated = str_ireplace('Comment', 'reactie', $translated); $translated = str_ireplace('Comments', 'reacties', $translated); return $translated; }Everything is working fine now.
Cheers!!!
July 21, 2016 at 5:03 am #1096780
Ying-Fu LiParticipantThanks. So just changed ‘gettext’ to ‘ngettext’?
July 21, 2016 at 6:08 am #1096855July 22, 2016 at 10:00 am #1098682
Ying-Fu LiParticipantAh, thanks!
July 22, 2016 at 11:13 am #1098751
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1091757 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
