Site logo

Archived topic

Cannot translate Leave a Comment and Post Comment

14 replies · Started by Hilton on August 10, 2019

Viewing posts 1–15 of 15

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

Hi Tom,
Yes, the words are there.
Thanks

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 :)

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.

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

Hi Tom,

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

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/

Now it is ok! ;)

Awesome :)

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?

Awesome, glad it's all working now :)

This archived topic is closed to new replies.