1: <?php
2: /**
3: * Copyright 2010-2012 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: * @author Michael Slusarz <slusarz@curecanti.org>
9: * @category Horde
10: * @license http://www.horde.org/licenses/lgpl21 LGPL
11: * @package Imap_Client
12: */
13:
14: /**
15: * Translation wrapper class for Horde_Imap_Client.
16: *
17: * @author Michael Slusarz <slusarz@curecanti.org>
18: * @category Horde
19: * @license http://www.horde.org/licenses/lgpl21 LGPL
20: * @package Imap_Client
21: */
22: class Horde_Imap_Client_Translation extends Horde_Translation
23: {
24: /**
25: * Returns the translation of a message.
26: *
27: * @var string $message The string to translate.
28: *
29: * @return string The string translation, or the original string if no
30: * translation exists.
31: */
32: static public function t($message)
33: {
34: self::$_domain = 'Horde_Imap_Client';
35: self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../../locale' : '@data_dir@/Horde_Imap_Client/locale';
36: return parent::t($message);
37: }
38:
39: /**
40: * Returns the plural translation of a message.
41: *
42: * @param string $singular The singular version to translate.
43: * @param string $plural The plural version to translate.
44: * @param integer $number The number that determines singular vs. plural.
45: *
46: * @return string The string translation, or the original string if no
47: * translation exists.
48: */
49: static public function ngettext($singular, $plural, $number)
50: {
51: self::$_domain = 'Horde_Imap_Client';
52: self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../../locale' : '@data_dir@/Horde_Imap_Client/locale';
53: return parent::ngettext($singular, $plural, $number);
54: }
55: }
56: