Site logo

Archived topic

Display post author not translated

5 replies · Started by Phuc on April 13, 2020

Viewing posts 1–6 of 6

The German translation of "by" before the post author is missing.
e.g 6. April 2020 by Someone

Is that something, that you have to include or can I fix this myself? If so, where can I fix it?

Thanks

Hi there,

Try this PHP:

add_filter( 'gettext', function( $text ) {
    if ( 'by' === $text ) {
        $text = 'YOUR TEXT';
    }

    return $text;
} );

That will sure do the trick without me even trying. But what am I going to do, when I have more than one language? Is this the clean way to make it translatable?

I just double checked with the default twentytwenty theme...they failed the translation of this part, which is sad.

But when I'm fixing this, I wanna do it right for other languages to come. Can you help me with that?

I just figured, where the problem was. I used german(Austria). Had to switch to german(sie) so that "by" got translated. Which is really stupid, because there's no difference. I don't even see the point of having german Austria. But anyway, German is translated 100% already. Thanks

That's strange, you would think they would fallback in that case. Glad it's working now :)

This archived topic is closed to new replies.