Overview

Packages

  • Browser

Classes

  • Horde_Browser
  • Horde_Browser_Exception
  • Horde_Browser_Translation
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Copyright 2011-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:  * @package Browser
 9:  */
10: 
11: /**
12:  * Horde_Browser_Translation is the translation wrapper class for
13:  * Horde_Browser.
14:  *
15:  * @author  Jan Schneider <jan@horde.org>
16:  * @package Browser
17:  */
18: class Horde_Browser_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_Browser';
31:         self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../locale' : '@data_dir@/Horde_Browser/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_Browser';
48:         self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? dirname(__FILE__) . '/../../../locale' : '@data_dir@/Horde_Browser/locale';
49:         return parent::ngettext($singular, $plural, $number);
50:     }
51: }
52: 
API documentation generated by ApiGen