1: <?php
2: /**
3: * @package Service_Facebook
4: *
5: * Copyright 2010-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:
11: /**
12: * Horde_Service_Facebook_Translation is the translation wrapper class for
13: * Horde_Service_Facebook.
14: *
15: * @author Jan Schneider <jan@horde.org>
16: * @package Service_Facebook
17: */
18: class Horde_Service_Facebook_Translation extends Horde_Translation
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: static public function t($message)
29: {
30: self::$_domain = 'Horde_Service_Facebook';
31: self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../../locale' : '@data_dir@/Horde_Service_Facebook/locale';
32: return parent::t($message);
33: }
34:
35: /**
36: * Returns the plural translation of a message.
37: *
38: * @param string $singular The singular version to translate.
39: * @param string $plural The plural version to translate.
40: * @param integer $number The number that determines singular vs. plural.
41: *
42: * @return string The string translation, or the original string if no
43: * translation exists.
44: */
45: static public function ngettext($singular, $plural, $number)
46: {
47: self::$_domain = 'Horde_Service_Facebook';
48: self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../../locale' : '@data_dir@/Horde_Service_Facebook/locale';
49: return parent::ngettext($singular, $plural, $number);
50: }
51: }
52: