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