ID:               40298
 Updated by:       [EMAIL PROTECTED]
 Reported By:      redlizard at redlizard dot nl
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Irrelevant
 PHP Version:      5.2.0
 New Comment:

gettext() uses gettext() function (see `man 3 gettext`).


Previous Comments:
------------------------------------------------------------------------

[2007-01-31 19:39:08] redlizard at redlizard dot nl

Description:
------------
When using gettext($somestring), if $somestring could not be
translated, it is returned without further translation. There should be
a possibility to return a specific value if the string could not be
translated instead. This impossibility is rather annoying when writing
a sophisticated i18n system.

Reproduce code:
---------------
// suggested solution:
$translated_text = gettext("some_string", true /* this optional
parameter stands for "return false if text could not be translated"
*/);

if($translated_text === false) {
  echo "some_string could not be translated!\n";
} else {
  echo "some_string is $some_string in your favorite language\n";
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40298&edit=1

Reply via email to