Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZShuffleTranslator Class Reference
Internationalization » Translation

Translates text by moving characters around. More...

Inheritance diagram for eZShuffleTranslator:

## Public Member Functions
| __construct ( $max_chars=3)
| findMessage ( $context, $source, $comment=null)
& | shuffleText ( $text)
| translate ( $context, $source, $comment=null)
Public Member Functions inherited from eZTranslatorHandler
| isKeyBased ()
| findKey ( $key)
| keyTranslate ( $key)

## Public Attributes
| $MaxChars
| $Messages
Public Attributes inherited from eZTranslatorHandler
| $IsKeyBased

## Detailed Description

Translates text by moving characters around.

Definition at line 19 of file ezshuffletranslator.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZShuffleTranslator::__construct | ( |  | $max_chars = `3` | ) |

Constructor

Parameters

  int | $max_chars |

Reimplemented from eZTranslatorHandler.

Definition at line 27 of file ezshuffletranslator.php.

## Member Function Documentation

## ◆ findMessage()

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 35 of file ezshuffletranslator.php.

References $translation, eZTranslatorManager\instance(), and shuffleText().

Referenced by translate().

## ◆ shuffleText()

& 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 46 of file ezshuffletranslator.php.

References $i, and $tmp.

Referenced by findMessage().

## ◆ translate()

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 73 of file ezshuffletranslator.php.

References $msg, and findMessage().

## Member Data Documentation

## ◆ $MaxChars

eZShuffleTranslator::$MaxChars

Definition at line 21 of file ezshuffletranslator.php.

## ◆ $Messages

eZShuffleTranslator::$Messages

Contains the hash table with cached 1337 translations

Definition at line 86 of file ezshuffletranslator.php.

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

- ezshuffletranslator.php

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