[Resolved] Cannot translate Leave a Comment and Post Comment

Home Forums Support [Resolved] Cannot translate Leave a Comment and Post Comment

Home Forums Support Cannot translate Leave a Comment and Post Comment

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #980860
    Hilton

    Hi,
    The only things I cannot translate are Leave a Comment and Post Comment button. Can you help?

    #980974
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are those words translated into your language here?: https://translate.wordpress.org/projects/wp-themes/generatepress/

    Let me know πŸ™‚

    #980986
    Hilton

    Hi Tom,
    Yes, the words are there.
    Thanks

    #980988
    Tom
    Lead Developer
    Lead Developer

    The words are translated? Which language?

    Is there an “Update Translations” button in “Dashboard > Updates” in your admin area? If so, can you click it?

    Let me know πŸ™‚

    #981000
    Hilton

    No, there isn’t such button. Maybe because I changed the theme folder name, I don’t know… The words are translated in Portuguese Brazil.

    #981442
    Tom
    Lead Developer
    Lead Developer

    Ah, can you try changing the folder name back to see if that’s the issue?

    #982176
    Hilton

    Hi Tom,

    I can’t change name back because doing this WP won’t load.

    #982480
    Tom
    Lead Developer
    Lead Developer

    Hmm, I suppose you could try this:

    add_filter( 'gettext', function( $text ) {
        if ( 'Leave a Comment' === $text ) {
            $text = 'Your new text here';
        }
    
        if ( 'Post a Comment' === $text ) {
            $text = 'Your new text here';
        }
    
        return $text;
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #982574
    Hilton

    Hi Tom,

    It didn’t work πŸ™

    https://prnt.sc/orwfuz

    #983196
    Tom
    Lead Developer
    Lead Developer
    #983225
    Hilton

    Now it is ok! πŸ˜‰

    #983488
    Tom
    Lead Developer
    Lead Developer

    Awesome πŸ™‚

    #983523
    Hilton

    Tom,

    There are more words to translate… for example:

    ← Previous 1 2 3 … 43 Next β†’

    Nothing Found
    Sorry, but nothing matched your search terms. Please try again with some different keywords.

    1.606 thoughts on β€œMy article title”
    ← Older Comments
    Newer Comments β†’

    Name*
    E-mail*
    Website

    We really need to find a way to translate these words. Can you help please?

    #983563
    Hilton

    Hi Tom,

    I downloaded generatepress translation from here https://translate.wordpress.org/projects/wp-themes/generatepress and followed this instructions https://docs.generatepress.com/article/uploading-translations/ , and the problem was fixed.

    Thanks

    #984159
    Tom
    Lead Developer
    Lead Developer

    Awesome, glad it’s all working now πŸ™‚

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.