eZPublishCommunityProject(LegacyStack)  2013.5
eZBorkTranslator Class Reference

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

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

Public Member Functions

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

Static Public Member Functions

static initialize ()
 

Public Attributes

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

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.

Member Function Documentation

eZBorkTranslator::borkify (   $text)

Translates the text into bork code.

Referenced by findMessage().

eZBorkTranslator::eZBorkTranslator ( )

Construct the translator.

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.

Referenced by translate().

static eZBorkTranslator::initialize ( )
static

Initialize the bork translator if this is not allready done.

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.

Member Data Documentation

eZBorkTranslator::$Messages

Contains the hash table with cached bork translations.


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