Exponential 6.0.13 Exponential Enterprise Open Source 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 18 of file ezshuffletranslator.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructor

Parameters

  int | $max_chars |

Reimplemented from eZTranslatorHandler.

Definition at line 26 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 34 of file ezshuffletranslator.php.

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

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

References findMessage().

## Member Data Documentation

## ◆ $MaxChars

eZShuffleTranslator::$MaxChars

Definition at line 20 of file ezshuffletranslator.php.

## ◆ $Messages

eZShuffleTranslator::$Messages

Contains the hash table with cached 1337 translations

Definition at line 85 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+.