Tagged: x
-
AuthorPosts
-
February 5, 2017 at 5:30 pm #1358919
ili333ParticipantHi, I’m very new to WordPress and X Theme and just wondering about the “read more” button on my posts-page.
My blog is in german, but only the “Read more” button (and also the comment box) is written in english.
How can I change the language of this button from “Read more” to german “Hier weiterlesen!” ?In this case I’m grateful for every help, which brings me forward solving this problem.
Thank you.PS: Switching the overall language of WordPress interface to german language doesn’t help fixing this.
I also uploaded a screenshot for better understanding of this issue.
February 5, 2017 at 5:37 pm #1358923
ili333Participantmaybe providing you with a link is better than uploading oversized screenshots.
February 5, 2017 at 11:04 pm #1359147
RupokMemberHi there,
Thanks for writing in Let’s follow this thread – https://community.theme.co/forums/topic/how-to-translate-read-more-button-blog-post/
Cheers!
February 6, 2017 at 7:04 am #1359588
ili333ParticipantThank you a lot! Works fine with the instruction in the existing thread.
Now I´m struggling with the comment box of every single post. How can I translate that into german too?February 6, 2017 at 7:26 am #1359612
ThaiModeratorHi There,
Please add the following code under functions.php file locates in your child theme:
add_filter('gettext', 'x_translate_text' , 20, 3); function x_translate_text ( $translated_text, $text, $domain ) { $translation = array( 'Submit' => 'Your text', 'Leave a Comment' => 'Your text' ); if( isset( $translation[$text] ) ) { return $translation[$text]; } return $translated_text; }Hope it helps 🙂
February 6, 2017 at 12:25 pm #1360008
ili333ParticipantYes it helped. But instead of “Leave a Comment” there must be “Leave a Reply”.
But I hoped it will change also the language of the “comment counter” underneath the post-title.
Maybe there exists a solution too?February 6, 2017 at 10:15 pm #1360625
RupokMemberHi there,
Thanks for writing back. Yes that should be “Leave a Reply”. You can try adding “Comment” on the translation array as well :
add_filter('gettext', 'x_translate_text' , 20, 3); function x_translate_text ( $translated_text, $text, $domain ) { $translation = array( 'Submit' => 'Your text', 'Leave a Reply' => 'Your text' 'Comment' => 'Your text' ); if( isset( $translation[$text] ) ) { return $translation[$text]; } return $translated_text; }Hope this helps.
Cheers!
February 7, 2017 at 6:02 pm #1361947
ili333ParticipantThanks for your reply, but ‘Comment’ => ‘Your text’ didn’t work out.
I think it is a special code string featured with a counter…February 8, 2017 at 12:49 am #1362398
RupokMemberHi there,
Thanks for updating. Here is a working solution for this – https://community.theme.co/forums/topic/translate-x-comments-text-on-blog-page/#post-1039472
Cheers!
February 8, 2017 at 4:08 pm #1363436
ili333ParticipantYeah, thank you! Works fine, but like in the last issue, I needed to change
“if ( ! function_exists( ‘x_integrity_entry_meta’ ) ) :
function x_integrity_entry_meta() {” to the renew-stack.So instead of this code I tried
“if ( ! function_exists( ‘x_renew_entry_meta’ ) ) :
function x_renew_entry_meta() {February 8, 2017 at 6:34 pm #1363557
NicoModeratorHappy to hear that. Thank you for sharing us your code you used. It would help a lot.
Feel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1358919 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
