[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/horde/framework/Horde/Mime/ -> Translation.php (source)

   1  <?php
   2  /**
   3   * Copyright 2010-2014 Horde LLC (http://www.horde.org/)
   4   *
   5   * See the enclosed file COPYING for license information (LGPL). If you
   6   * did not receive this file, see http://www.horde.org/licenses/lgpl21.
   7   *
   8   * @category  Mime
   9   * @copyright 2010-2014 Horde LLC
  10   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  11   * @package   Mime
  12   */
  13  
  14  /**
  15   * Horde_Mime_Translation is the translation wrapper class for Horde_Mime.
  16   *
  17   * @author    Jan Schneider <jan@horde.org>
  18   * @category  Mime
  19   * @copyright 2010-2014 Horde LLC
  20   * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
  21   * @package   Mime
  22   */
  23  class Horde_Mime_Translation extends Horde_Translation
  24  {
  25      /**
  26       * Returns the translation of a message.
  27       *
  28       * @var string $message  The string to translate.
  29       *
  30       * @return string  The string translation, or the original string if no
  31       *                 translation exists.
  32       */
  33      static public function t($message)
  34      {
  35          self::$_domain = 'Horde_Mime';
  36          self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Mime/locale';
  37          return parent::t($message);
  38      }
  39  
  40      /**
  41       * Returns the plural translation of a message.
  42       *
  43       * @param string $singular  The singular version to translate.
  44       * @param string $plural    The plural version to translate.
  45       * @param integer $number   The number that determines singular vs. plural.
  46       *
  47       * @return string  The string translation, or the original string if no
  48       *                 translation exists.
  49       */
  50      static public function ngettext($singular, $plural, $number)
  51      {
  52          self::$_domain = 'Horde_Mime';
  53          self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Mime/locale';
  54          return parent::ngettext($singular, $plural, $number);
  55      }
  56  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1