Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1358919
    ili333
    Participant

    Hi, 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.

    #1358923
    ili333
    Participant

    maybe providing you with a link is better than uploading oversized screenshots.

    http://veritasblog.de/artikel/

    #1359147
    Rupok
    Member

    Hi 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!

    #1359588
    ili333
    Participant

    Thank 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?

    #1359612
    Thai
    Moderator

    Hi 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 🙂

    #1360008
    ili333
    Participant

    Yes 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?

    #1360625
    Rupok
    Member

    Hi 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!

    #1361947
    ili333
    Participant

    Thanks for your reply, but ‘Comment’ => ‘Your text’ didn’t work out.
    I think it is a special code string featured with a counter…

    #1362398
    Rupok
    Member

    Hi 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!

    #1363436
    ili333
    Participant

    Yeah, 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() {

    #1363557
    Nico
    Moderator

    Happy to hear that. Thank you for sharing us your code you used. It would help a lot.

    Feel free to ask us again.

    Thanks.

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