Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
   1  <?php
   2  /**
   3   * @package Translation
   4   *
   5   * Copyright 2010-2017 Horde LLC (http://www.horde.org/)
   6   *
   7   * See the enclosed file LICENSE for license information (LGPL). If you
   8   * did not receive this file, see http://www.horde.org/licenses/lgpl21.
   9   */
  10  
  11  /**
  12   * The Horde_Translation_Handler interface defines the interface for any
  13   * classes providing translations.
  14   *
  15   * @author  Jan Schneider <jan@horde.org>
  16   * @package Translation
  17   */
  18  interface Horde_Translation_Handler
  19  {
  20      /**
  21       * Returns the translation of a message.
  22       *
  23       * @var string $message  The string to translate.
  24       *
  25       * @return string  The string translation, or the original string if no
  26       *                 translation exists.
  27       */
  28      public function t($message);
  29  
  30      /**
  31       * Returns the plural translation of a message.
  32       *
  33       * @param string $singular  The singular version to translate.
  34       * @param string $plural    The plural version to translate.
  35       * @param integer $number   The number that determines singular vs. plural.
  36       *
  37       * @return string  The string translation, or the original string if no
  38       *                 translation exists.
  39       */
  40      public function ngettext($singular, $plural, $number);
  41  }