\Horde_Translation_Handler_Gettext

The Horde_Translation_Handler_Gettext provides translations through the gettext extension, but fails gracefully if gettext is not installed.

Summary

Methods
Properties
Constants
__construct()
t()
ngettext()
No public properties found
No constants found
No protected methods found
$_domain
$_gettext
N/A
No private methods found
No private properties found
N/A

Properties

$_domain

$_domain : string

The translation domain, e.g. package name.

Type

string

$_gettext

$_gettext : boolean

Whether the gettext extension is installed.

Type

boolean

Methods

__construct()

__construct(string  $domain, string  $path) 

Constructor.

Parameters

string $domain

The translation domain, e.g. package name.

string $path

The path to the gettext catalog.

t()

t(string  $message) : string

Returns the translation of a message.

Parameters

string $message

The string to translate.

Returns

string —

The string translation, or the original string if no translation exists.

ngettext()

ngettext(string  $singular, string  $plural, integer  $number) : string

Returns the plural translation of a message.

Parameters

string $singular

The singular version to translate.

string $plural

The plural version to translate.

integer $number

The number that determines singular vs. plural.

Returns

string —

The string translation, or the original string if no translation exists.