From: nico dot weinreich at gmail dot com Operating system: All PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:Extend sprintf function by type specifier for uppercase and lowercase
Description: ------------ I'm using sprintf() to realize multi language setup of my projects in a simple way, e.g.: $l['Stichworte'] = 'Uppslagsord'; $l['Alle %s mit %s'] = 'Alla %s på %s'; Base language is german, target language is swedish. On runtime I'm doing something like: echo sprintf(Lang::get("Alle %s mit %s"), Lang::get("Stichworte"), 'K'); So I get for german 'Alle Stichworte mit K' and for swedish 'Alla Uppslagsord på K'. The problem is, in this context the word 'Uppslagsord' has to be in lowercase for swedish. So it would be great, if there are two more type specifiers for sprintf() to allow text transformation, e.g.: %s - the argument is treated as and presented as a string %t - the argument is treated as and presented as a lowercase string %T - the argument is treated as and presented as a uppercase string -- Edit bug report at https://bugs.php.net/bug.php?id=65321&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65321&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65321&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65321&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65321&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65321&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65321&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65321&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65321&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65321&r=support Expected behavior: https://bugs.php.net/fix.php?id=65321&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65321&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65321&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65321&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65321&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65321&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65321&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65321&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65321&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65321&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65321&r=mysqlcfg