Change text from button 'Read more' into our
-
Can you post the code you have in functions.php here?
as you wish
(that file functions.php i’ve made from scratch, so only text there is that under)
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Pozostaw komentarz' => 'Komentarz',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>Try,
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Read more' => 'Komentarz',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>Hmm, isn’t that “Leave a comment”??
Yep, certainly, but it’s not the most important. I have polish version so ‘Leave a comment’ goes to ‘Pozostaw komentarz’
and all i want is to change that ‘Pozostaw komentarz’ into Skomentuj’.
Unfortunatelly, your code from above still doesn’t change anything on my site ;/.
In that case, try this.
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Leave comment' => 'Skomentuj',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>
Viewing 10 posts - 1 through 10 (of 20 total)
- 1
- 2
- You must be logged in to reply to this topic.