Archived topic
Cannot translate Leave a Comment and Post Comment
14 replies · Started by Hilton on August 10, 2019
Hi,
The only things I cannot translate are Leave a Comment and Post Comment button. Can you help?
Hi there,
Are those words translated into your language here?: https://translate.wordpress.org/projects/wp-themes/generatepress/
Let me know :)
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/
Sorry about that, can you try the updated code above?: https://generatepress.com/forums/topic/cannot-translate-leave-a-comment-and-post-comment/#post-982480
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?
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
Awesome, glad it's all working now :)