ngettext.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * SquirrelMail internal ngettext functions
  4. *
  5. * Uses php-gettext classes
  6. *
  7. * Copyright (c) 2004-2005 The SquirrelMail Project Team
  8. * Licensed under the GNU GPL. For full terms see the file COPYING.
  9. *
  10. * @copyright (c) 2004-2005 The SquirrelMail Project Team
  11. * @license http://opensource.org/licenses/gpl-license.php GNU Public Licens
  12. * @link http://www.php.net/gettext Original php gettext manual
  13. * @link http://savannah.nongnu.org/projects/php-gettext php-gettext classes
  14. * @version $Id$
  15. * @package squirrelmail
  16. * @subpackage i18n
  17. * @since 1.5.1
  18. */
  19. /**
  20. * internal ngettext wrapper.
  21. *
  22. * provides ngettext support
  23. * @since 1.5.1
  24. * @link http://www.php.net/function.ngettext
  25. * @param string $single English string, singular form
  26. * @param string $plural English string, plural form
  27. * @param integer $number number that shows used quantity
  28. * @return string translated string
  29. */
  30. function ngettext($single, $plural, $number) {
  31. global $l10n, $gettext_domain;
  32. if ($l10n[$gettext_domain]->error==1) return $single;
  33. return $l10n[$gettext_domain]->ngettext($single, $plural, $number);
  34. }
  35. ?>