Overview

Packages

  • Translation

Classes

  • Horde_Translation
  • Horde_Translation_Handler_Gettext

Interfaces

  • Horde_Translation_Handler

Exceptions

  • Horde_Translation_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Translation

Horde_Translation is the base class for any translation wrapper classes in libraries that want to utilize the Horde_Translation library for translations.

Abstract
Package: Translation
Author: Jan Schneider jan@horde.org
Located at Horde/Translation.php
Methods summary
public static
# loadHandler( string $handlerClass )

Loads a translation handler class pointing to the library's translations and assigns it to $_handler.

Loads a translation handler class pointing to the library's translations and assigns it to $_handler.

Parameters

$handlerClass
<p>The name of a class implementing the Horde_Translation_Handler interface.</p>
public static
# setHandler( string $domain, Horde_Translation_Handler $handler )

Assigns a translation handler object to $_handlers.

Assigns a translation handler object to $_handlers.

Type hinting isn't used on purpose. You should extend a custom translation handler passed here from the Horde_Translation interface, but technically it's sufficient if you provide the API of that interface.

Parameters

$domain
The translation domain.
$handler
<p>An object implementing the Horde_Translation_Handler interface.</p>
public static string
# t( mixed $message )

Returns the translation of a message.

Returns the translation of a message.

Returns

string

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

Var

string $message The string to translate.
public static string
# ngettext( string $singular, string $plural, integer $number )

Returns the plural translation of a message.

Returns the plural translation of a message.

Parameters

$singular
The singular version to translate.
$plural
The plural version to translate.
$number
The number that determines singular vs. plural.

Returns

string

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

API documentation generated by ApiGen