Can't traduct "Older Posts" & "Newer Posts"

Hello,

In my theme (i’m french) i have there buttons with no traduction
Imgur
Imgur

“Loco translate” (a traduction plugin) tell me that these words are well translated, but nothing happens, they remain in English
Imgur

the site

Anyone have an idea ?

Hi there

such strings might be from the WordPress, so, make sure WordPress is also 100% translated, you can use same plugin to check it

1 Like

Hello, same thing here :
Imgur

Just in case, i try to change Extra.php and Archive.php where “Older posts” and “Newer posts” appear, but nothing

So, no solution, i’m juste desactivating the “Newer/Older posts” with

a.next.page-numbers, a.prev.page-numbers {
display: none;
}

Bye

Hi,

I am using this in my functions.php inside my sparkling-child.

function t1_change_text( $translated_text ) {
if ( $translated_text == ‘Newer posts’ ) {
$translated_text = ‘Uuemad postitused’;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘t1_change_text’, 20 );

function t2_change_text( $translated_text ) {
if ( $translated_text == ‘Older posts’ ) {
$translated_text = ‘Vanemad postitused’;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘t2_change_text’, 20 );

I hope it helps you,

With gratitude,
Marx-Veix

1 Like

Oh it is work thanks men !

1 Like

Thanks for sharing your great solution @marx-veix :slight_smile: