eZ Publish  [trunk]
eZBorkTranslator Class Reference

Translates text into the Bork language (Mock Swedish) More...

+ Inheritance diagram for eZBorkTranslator:
+ Collaboration diagram for eZBorkTranslator:

List of all members.

Public Member Functions

 borkify ($text)
 eZBorkTranslator ()
 findMessage ($context, $source, $comment=null)
 translate ($context, $source, $comment=null)

Static Public Member Functions

static initialize ()

Public Attributes

 $Messages
 Contains the hash table with cached bork translations.

Detailed Description

Translates text into the Bork language (Mock Swedish)

This translation is adapted from the Mock Swedish translation in Qt Quarterly 3/2002: http://doc.trolltech.com/qq/qq03-swedish-chef.html

It translates the following characters/strings: (The "|" sign stands for a word boundary, and "-" stands for mid-word.)

a- -> e an -> un au -> oo en| -> ee -ew -> oo -f -> ff -i -> ee -ir -> ur |o -> oo ow -> oo ph -> f th| -> t -tion -> shun -u -> oo |U- -> Oo y| -> ai v -> f w -> v

Words that are not changed by these rules will have "-a" appended to them.

Definition at line 45 of file ezborktranslator.php.


Member Function Documentation

Translates the text into bork code.

Definition at line 74 of file ezborktranslator.php.

Referenced by findMessage().

Construct the translator.

Definition at line 50 of file ezborktranslator.php.

Referenced by initialize().

eZBorkTranslator::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 57 of file ezborktranslator.php.

Referenced by translate().

static eZBorkTranslator::initialize ( ) [static]

Initialize the bork translator if this is not allready done.

Definition at line 130 of file ezborktranslator.php.

Referenced by ezpI18n\translateText().

eZBorkTranslator::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 115 of file ezborktranslator.php.


Member Data Documentation

eZBorkTranslator::$Messages

Contains the hash table with cached bork translations.

Definition at line 145 of file ezborktranslator.php.


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