This page requires java-script to be enabled. Please adjust your browser-settings.
streber
PM
Login
|
Register
guest
Home
Your Tasks
Bookmarks
Efforts
Overall history
P
rojects
streber
People
Companies
S
earch:
streber
>
Tasks
|
Docu
|
Milestones
|
Versions
|
Files
|
History
Help
Community
>
Translation Gu...
> Comment
swapping arguments in printf-formatted strings
/
#3457
Edit
Bookmark
Delete
About %-fields in printf-formatted strings, remember that argument are matched positionally. Occasionally a language needs to use a different order. For example the English "Ganesh's tasks" becomes "Attività di Ganesh" in Italian. If the English string is "%s's %s" the translation "%s di %s" would be incorrect because of the inversion. This case is easily managed using the "numbered" syntax introduced in PHP 4.0.6 (
php.net/manual/en/function.sprintf.php
). The correct translation would thus be "%2$s di %1$s".