Author: Jan Schneider (jan@horde.org)
Inheritance: extends Horde_Translation_Autodetect
Exemple #1
0
 /**
  * Returns principal details.
  *
  * @param string $user  A user name.
  *
  * @return array  A hash with user information.
  */
 protected function _getUserInfo($user)
 {
     if ($user == '-system-') {
         return array('uri' => 'principals/-system-', '{DAV:}displayname' => Horde_Dav_Translation::t("System"));
     }
     $identity = $this->_identities->create($user);
     return array('uri' => 'principals/' . $user, '{DAV:}displayname' => $identity->getName(), '{http://sabredav.org/ns}email-address' => (string) $identity->getDefaultFromAddress());
 }
Exemple #2
0
 /**
  * Returns the plural translation of a message.
  *
  * @param string $singular  The singular version to translate.
  * @param string $plural    The plural version to translate.
  * @param integer $number   The number that determines singular vs. plural.
  *
  * @return string  The string translation, or the original string if no
  *                 translation exists.
  */
 public static function ngettext($singular, $plural, $number)
 {
     self::$_domain = 'Horde_Dav';
     self::$_directory = '@data_dir@' == '@' . 'data_dir' . '@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Dav/locale';
     return parent::ngettext($singular, $plural, $number);
 }