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