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 14845 2020-01-07 08:09:34Z pdontthink $
  11.  * @package plugins
  12.  * @subpackage test
  13.  */
  14.  
  15. include_once('../../include/init.php');
  16.  
  17. global $oTemplate$color;
  18.  
  19. displayPageHeader($color'');
  20.  
  21.  
  22. // NOTE: Not bothering to "templatize" the following output, since
  23. //       this plugin is merely an administrative (and not user-facing)
  24. //       tool.  If this is really important to you, please help by
  25. //       submitting the work to the team.
  26.  
  27. ?>
  28. <strong>ngettext Test Strings:</strong>
  29.  
  30. <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>
  31.  
  32. <pre>
  33.  
  34. <?php
  35.  
  36. for ($i = -10 $i <= 250 $i++{
  37.     echo sprintf(ngettext("%s squirrel is on the tree.""%s squirrels are on the tree."$i)$i);
  38.     echo "\n";
  39. }
  40.  
  41. echo "</pre>";
  42.  
  43. sq_change_text_domain('squirrelmail');
  44. $oTemplate->display('footer.tpl');

Documentation generated on Mon, 13 Jan 2020 04:23:11 +0100 by phpDocumentor 1.4.3