Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZTranslatorHandler Class Referenceabstract
Internationalization » Translation

Base class for translation handling. More...

Inheritance diagram for eZTranslatorHandler:

## Public Member Functions
| __construct ( $is_key_based)
| isKeyBased ()
| findKey ( $key)
| findMessage ( $context, $source, $comment=null)
| translate ( $context, $source, $comment=null)
| keyTranslate ( $key)

## Public Attributes
| $IsKeyBased

## Detailed Description

Base class for translation handling.

Definition at line 19 of file eztranslatorhandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZTranslatorHandler::__construct | ( |  | $is_key_based | ) |

Constructor

Parameters

  bool | $is_key_based |

Reimplemented in eZShuffleTranslator, eZTranslatorGroup, and eZRandomTranslator.

Definition at line 26 of file eztranslatorhandler.php.

## Member Function Documentation

## ◆ findKey()

eZTranslatorHandler::findKey | ( |  | $key | ) |
| pure virtual

Returns
  the translation message for the key $key or null if the key does not exist.

This function must overridden if isKeyBased() is true.

Implemented in eZTSTranslator, and eZTranslatorGroup.

Definition at line 46 of file eztranslatorhandler.php.

## ◆ findMessage()

eZTranslatorHandler::findMessage | ( |  | $context,
|  |  | $source,
|  |  | $comment = `null`
| ) |  |
| pure virtual

Returns
  the translation message for $source and $context or null if the key does not exist.

If you know the translation key use findKey() instead.

This function must overridden if isKeyBased() is true.

Implemented in eZTSTranslator, eZTranslatorGroup, eZShuffleTranslator, eZBorkTranslator, and eZ1337Translator.

Definition at line 59 of file eztranslatorhandler.php.

## ◆ isKeyBased()

eZTranslatorHandler::isKeyBased | ( |  | ) |

Returns
  true if the handler can lookup translations with translation keys.

Definition at line 35 of file eztranslatorhandler.php.

References $IsKeyBased.

Referenced by eZTranslatorGroup\registerHandler().

## ◆ keyTranslate()

eZTranslatorHandler::keyTranslate | ( |  | $key | ) |
| pure virtual

Returns
  the translation string for $key or null if the translation does not exist.

See also
  findMessage, findKey

Implemented in eZTSTranslator, and eZTranslatorGroup.

Definition at line 81 of file eztranslatorhandler.php.

## ◆ translate()

eZTranslatorHandler::translate | ( |  | $context,
|  |  | $source,
|  |  | $comment = `null`
| ) |  |
| pure virtual

Returns
  the translation string for $source and $context or null if the translation does not exist.

See also
  findMessage, findKey

Implemented in eZTSTranslator, eZTranslatorGroup, eZShuffleTranslator, eZBorkTranslator, and eZ1337Translator.

Definition at line 70 of file eztranslatorhandler.php.

## Member Data Documentation

## ◆ $IsKeyBased

eZTranslatorHandler::$IsKeyBased

Tells whether the handler is key based or not

Definition at line 88 of file eztranslatorhandler.php.

Referenced by isKeyBased().

The documentation for this class was generated from the following file:

- eztranslatorhandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.