-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
I'm looking through the content templates, and one of the common issues I see with a lot of themes is broken translation strings like so:
%%DATE before="<?php _e( 'Posted on ', 'cherry' ); ?>"%%
Generally, in straight PHP, this is best handled like so:
<?php printf( __( 'Posted on %s', 'cherry' ), get_the_date() ); ?>
The need for placeholders like %s
is very important because not all languages have the same sentence structures. That's why Posted on %s
is better; it allows translators to properly move the pieces of the strings around to match their language.