Source for file ngettext.php

Documentation is available at ngettext.php

  1. <?php
  2.  
  3. /**
  4.  * SquirrelMail Test Plugin
  5.  *
  6.  * This page tests the ngettext() function.
  7.  *
  8.  * @copyright 2006-2020 The SquirrelMail Project Team
  9.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.  * @version $Id: ngettext.php 14840 2020-01-07 07:42:38Z pdontthink $
  11.  * @package plugins
  12.  * @subpackage test
  13.  */
  14.  
  15. define('SM_PATH''../../');
  16. include_once(SM_PATH 'include/validate.php');
  17.  
  18. global $color;
  19.  
  20. displayPageHeader($color'none');
  21.  
  22.  
  23. ?>
  24. <strong>ngettext Test Strings:</strong>
  25.  
  26. <p>The results of this test depend on your current language (translation) selection (see Options==>Display Preferences) and the corresponding translation strings in locale/xx/LC_MESSAGES/test.mo</p>
  27.  
  28. <pre>
  29.  
  30. <?php
  31.  
  32. for ($i = -10 $i <= 250 $i++{
  33.     echo sprintf(ngettext("%s squirrel is on the tree.""%s squirrels are on the tree."$i)$i);
  34.     echo "\n";
  35. }
  36.  
  37. echo "</pre></body></html>";
  38.  
  39. sq_change_text_domain('squirrelmail');

Documentation generated on Mon, 13 Jan 2020 04:25:02 +0100 by phpDocumentor 1.4.3