Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: 1.9.6
-
Fix Version/s: 1.9.7
-
Component/s: Zend_Translate
-
Labels:None
Description
The documentation (http://framework.zend.com/manual/en/zend.translate.using.html) describes how you can use multiple numbered parameters in a string.
But the examples are wrong!
Now there is:
printf($translate->_("Today is the %1\$s") . "\n", date('d.m.Y'));
The right example should be without the "\" in "%1\$s" :
printf($translate->_("Today is the %1$s") . "\n", date('d.m.Y'));
Closing as non-issue.
Please read the PHP manual about printf/sprintf before stating that their syntax is wrong.
Your change would return 'Today is the ' and throw an warning about $s not being declared.