📚 Looking for current Exponential documentation? This site contains legacy SDK & API reference docs (eZ Publish era). For up-to-date 2026 product documentation, visit doc.exponential.earth.

  class / eZTranslatorGroup  

eZTranslatorGroup Class Reference
[Translation]

Allows for picking translator handlers according to context. More...

Inheritance diagram for eZTranslatorGroup:

TODO — Image not available in archive

Title:   eZTranslatorGroup Class Inheritance Diagram (Doxygen)
File:    /doc/generated/html/classeZTranslatorGroup.png

What this image shows:
Doxygen-generated class inheritance diagram for the eZTranslatorGroup PHP class. Shows the inheritance hierarchy: which classes eZTranslatorGroup extends and which classes inherit from it, with links to parent and child class documentation. This diagram was auto-generated from the Exponential 3.1 PHP source code using Doxygen circa 2003.

Replacement instructions:
Run Doxygen on the Exponential 3.1 PHP source and locate the generated classeZTranslatorGroup.png in the output. Or draw the inheritance tree manually from the API reference. Save as /doc/generated/html/classeZTranslatorGroup.png

See /sdk/missing.html for the full list of missing images.
eZTranslatorHandler eZRandomTranslator List of all members.

Public Methods

 eZTranslatorGroup ($is_key_based)
findKey ($key)
findMessage ($context,$source,$comment=null)
translate ($context,$source,$comment=null)
keyTranslate ($key)
 keyPick ($key)
 pick ($context,$source,$comment)
 handlerCount ()
 registerHandler (&$handler)

Private Attributes

 Handlers

Detailed Description

Allows for picking translator handlers according to context.

Definition at line eztranslatorgroup.php.


Constructor & Destructor Documentation

eZTranslatorGroup::eZTranslatorGroup   is_key_based
 

Constructor

Definition at line eztranslatorgroup.php.

References Handlers.

Referenced by eZRandomTranslator::eZRandomTranslator().


Member Function Documentation

& eZTranslatorGroup::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.

Implements eZTranslatorHandler.

Definition at line eztranslatorgroup.php.

References keyPick().

& eZTranslatorGroup::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.

Implements eZTranslatorHandler.

Definition at line eztranslatorgroup.php.

References pick().

eZTranslatorGroup::handlerCount  
 

Returns:
the number of registered handlers.

Definition at line eztranslatorgroup.php.

Referenced by eZRandomTranslator::pick().

eZTranslatorGroup::keyPick   key [pure virtual]
 

Reimplement this to pick one of the registered handlers based on $key.

Returns:
-1 for no handler or a number within the handler range (starting from 0).
See also:
pick

Implemented in eZRandomTranslator.

Definition at line eztranslatorgroup.php.

Referenced by keyTranslate().

& eZTranslatorGroup::keyTranslate   key [pure virtual]
 

Returns:
the translation string for $key or null if the translation does not exist.
See also:
findMessage, findKey

Implements eZTranslatorHandler.

Definition at line eztranslatorgroup.php.

References keyPick().

eZTranslatorGroup::pick   context,
  source,
  comment
[pure virtual]
 

Reimplement this to pick one of the registered handlers based on $context, $source and $comment.

Returns:
-1 for no handler or a number within the handler range (starting from 0).
See also:
keyPick

Implemented in eZRandomTranslator.

Definition at line eztranslatorgroup.php.

Referenced by translate().

eZTranslatorGroup::registerHandler &$    handler
 

Registers the handler object $handler.

Definition at line eztranslatorgroup.php.

References eZDebug::writeError().

& eZTranslatorGroup::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

Implements eZTranslatorHandler.

Definition at line eztranslatorgroup.php.

References pick().


Member Data Documentation

eZTranslatorGroup::Handlers [private]
 

The array of grouped handlers

Definition at line eztranslatorgroup.php.

Referenced by translate().


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

Exponential Copyright © 1998 - 2026 7x