Created
May 31, 2012 13:03
-
-
Save corsonr/2843297 to your computer and use it in GitHub Desktop.
How to translate properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// String with a variable | |
printf(__("This string contains %d words."), $count); | |
// string with many variables | |
printf(__('Your city is %1$s, and your zip code is %2$s.'), $city, $zipcode); | |
// plural / singular | |
printf(_n("We deleted %d spam message.", "We deleted %d spam messages.", $count), $count); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment