Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

19 Mar 2006

Internationalizing strings with variables

Yesterday i wrote that you can use __($string, $domain) and _e($string, $domain) to internationalize a string with WordPress. I forgot to mention that if you use sprintf you can handle strings with variables too. An example:

echo sprintf(__('There are %d monkeys in the %s'), $domain), $number, $location);