eZ Publish  [4.2]
eZShuffleTranslator Class Reference

Translates text by moving characters around. More...

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

List of all members.

Public Member Functions

 eZShuffleTranslator ($max_chars=3)
 findMessage ($context, $source, $comment=null)
shuffleText ($text)
 translate ($context, $source, $comment=null)

Public Attributes

 $Messages
 Contains the hash table with cached 1337 translations.

Detailed Description

Translates text by moving characters around.

Definition at line 41 of file ezshuffletranslator.php.


Member Function Documentation

eZShuffleTranslator::eZShuffleTranslator ( max_chars = 3)

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

Definition at line 46 of file ezshuffletranslator.php.

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.

Definition at line 54 of file ezshuffletranslator.php.

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.

Definition at line 65 of file ezshuffletranslator.php.

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.

Definition at line 92 of file ezshuffletranslator.php.


Member Data Documentation

eZShuffleTranslator::$Messages

Contains the hash table with cached 1337 translations.

Definition at line 105 of file ezshuffletranslator.php.


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