note 29389 added to function.ngettext

From: Date: Wed, 12 Feb 2003 06:37:37 +0000
Subject: note 29389 added to function.ngettext
Groups: php.notes 
Request: Send a blank email to php-notes+get-43814@lists.php.net to get a copy of this message
Since there's no doc... the ngettext function is used somehow like you'd do in a C language context. You must wrap it inside a printf-family function. A typical example: $number = 1; printf(ngettext("%d bird", "%d birds", $number), $number); $number++; printf(ngettext("%d bird", "%d birds", $number), $number); will echo: 1 bird 2 birds Note that the argument has to be fed to both printf and ngettext for this to work. -- http://www.php.net/manual/en/function.ngettext.php http://master.php.net/manage/user-notes.php?action=edit+29389 http://master.php.net/manage/user-notes.php?action=delete+29389 http://master.php.net/manage/user-notes.php?action=reject+29389

« previous php.notes (#43814) next »