Translation2
[ class tree: Translation2 ] [ index: Translation2 ] [ all elements ]

Class: Translation2_Admin_Decorator

Source Location: /Translation2-2.0.0beta3/Admin/Decorator.php

Class Overview

Translation2_Decorator
   |
   --Translation2_Admin_Decorator

Decorates a Translation2_Admin class.


Author(s):

Methods


Child classes:

Translation2_Admin_Decorator_Autoadd
Automatically add requested strings

Inherited Variables

Inherited Methods

Class: Translation2_Decorator

Translation2_Decorator::Translation2_Decorator()
Constructor
Translation2_Decorator::get()
Get translated string
Translation2_Decorator::getDecorator()
Return an instance of a decorator
Translation2_Decorator::getLang()
get lang info
Translation2_Decorator::getLangs()
get langs
Translation2_Decorator::getPage()
Same as getRawPage, but resort to fallback language and replace parameters when needed
Translation2_Decorator::getRawPage()
Get the array of strings in a page
Translation2_Decorator::getStringID()
Get the stringID for the given string. This method is the reverse of get().
Translation2_Decorator::replaceEmptyStringsWithKeys()
Replace empty strings with their stringID
Translation2_Decorator::setLang()
Set default lang
Translation2_Decorator::setOption()
set Decorator option
Translation2_Decorator::setOptions()
set Decorator options
Translation2_Decorator::setPageID()
Set default page
Translation2_Decorator::setParams()
Set parameters for next string
Translation2_Decorator::translate()
Get translated string
Translation2_Decorator::_replaceParams()
Replace parameters in strings

Class Details

[line 36]
Decorates a Translation2_Admin class.

Create a subclass of this class for your own "decoration".

  • Todo: Don't allow stacking on top of regular Decorators, since that will break.
  • Abstract:


[ Top ]


Method Detail

add   [line 63]

void add( $stringID, [ $pageID = null], $stringArray)

Add a translation

Parameters:

   $stringID   — 
   $pageID   — 
   $stringArray   — 

[ Top ]

cleanCache   [line 93]

void cleanCache( )

Clean the cache

[ Top ]

createNewLang   [line 43]

void createNewLang( $langData)

Create a new language

Parameters:

   $langData   — 

[ Top ]

remove   [line 83]

void remove( $stringID, [ $pageID = null])

Remove a translation

Parameters:

   $stringID   — 
   $pageID   — 

[ Top ]

removeLang   [line 53]

void removeLang( [ $langID = null], [ $force = false])

Remove a language

Parameters:

   $langID   — 
   $force   — 

[ Top ]

update   [line 73]

void update( $stringID, [ $pageID = null], $stringArray)

Update a translation

Parameters:

   $stringID   — 
   $pageID   — 
   $stringArray   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:58:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.