eZPublish  4.7
eZShuffleTranslator Class Reference

Translates text by moving characters around. More...

+ Inheritance diagram for eZShuffleTranslator:
+ Collaboration diagram for eZShuffleTranslator:

Public Member Functions

 eZShuffleTranslator ($max_chars=3)
 
 findMessage ($context, $source, $comment=null)
 
shuffleText ($text)
 
 translate ($context, $source, $comment=null)
 
- Public Member Functions inherited from eZTranslatorHandler
 eZTranslatorHandler ($is_key_based)
 
 findKey ($key)
 
 isKeyBased ()
 
 keyTranslate ($key)
 

Public Attributes

 $Messages
 Contains the hash table with cached 1337 translations. More...
 
- Public Attributes inherited from eZTranslatorHandler
 $IsKeyBased
 Tells whether the handler is key based or not. More...
 

Detailed Description

Translates text by moving characters around.

Member Function Documentation

eZShuffleTranslator::eZShuffleTranslator (   $max_chars = 3)

Construct the translator and loads the translation file $file if is set and exists.

eZShuffleTranslator::findMessage (   $context,
  $source,
  $comment = null 
)
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.

Referenced by translate().

& eZShuffleTranslator::shuffleText (   $text)

Reorders some of the characters in $text and returns the new text string. The maximum number of reorders is taken from MaxChars.

Referenced by findMessage().

eZShuffleTranslator::translate (   $context,
  $source,
  $comment = null 
)
virtual
Returns
the translation string for $source and $context or null if the translation does not exist.
See Also
findMessage, findKey

Implements eZTranslatorHandler.

Member Data Documentation

eZShuffleTranslator::$Messages

Contains the hash table with cached 1337 translations.


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