Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken translations #26

Closed
justintadlock opened this issue Apr 24, 2015 · 0 comments
Closed

Broken translations #26

justintadlock opened this issue Apr 24, 2015 · 0 comments
Assignees
Labels

Comments

@justintadlock
Copy link

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.

@cheh cheh added the question label May 11, 2015
cheh added a commit that referenced this issue Oct 20, 2015
@cheh cheh closed this as completed Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants