Abstract Class Zend_Translate_Adapter

Description
  • abstract:
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Translate/Adapter.php (line 35)


	
			
Direct descendents
Variable Summary
 string $_language
 array $_languages
 Zend_Locale|null $_locale
 array $_options
 array $_translate
Method Summary
 Zend_Translate_Adapter __construct (string|array $options, [ $locale = null], string|Zend_Locale $language)
 void addTranslation (string|Zend_Locale $language, mixed $data, [boolean $clear = false])
 string getLanguage ()
 void getLanguageList ()
 Zend_Locale|null getLocale ()
 mixed getOptions ([string $optionKey = null])
 boolean isAvaiable (string|Zend_Locale $language)
 void setLanguage (string $language)
 void setLocale (string|Zend_Locale $locale)
 void setOptions (array $options)
 string toString ()
 string translate (string $translation, [string|Zend_Locale $language = null])
 void _loadTranslationData (string|Zend_Locale $language, mixed $data)
Variables
string $_language (line 50)

Actual set language

  • access: protected
array $_languages = array() (line 57)

Table of all supported languages

  • access: protected
Zend_Locale|null $_locale (line 43)

Current locale

Is equal to language, if it's a string

  • access: protected
array $_options = array('tablesize' => 500) (line 67)

Array with all options The following options are supported

[tablesize]: maximum size of the table array // not supported for now

  • access: protected
array $_translate = array() (line 74)

Translation table

  • access: protected
Methods
Constructor __construct (line 85)

Generates the adapter

  • access: public
  • throws: Zend_Translate_Exception
Zend_Translate_Adapter __construct (string|array $options, [ $locale = null], string|Zend_Locale $language)
  • string|array $options: Options for this adapter
  • string|Zend_Locale $language: OPTIONAL Language to set, identical with Locale identifiers see Zend_Locale for more information
  • $locale

Redefined in descendants as:
addTranslation (line 250)

Add translation data

It may be a new language or additional data for existing language If $clear parameter is true, then translation data for specified language is replaced and added otherwise

  • access: public
  • throws: Zend_Translate_Exception
void addTranslation (string|Zend_Locale $language, mixed $data, [boolean $clear = false])
  • string|Zend_Locale $language: Language to add data for, identical with locale identifier, see Zend_Locale for more information
  • mixed $data: Translation data
  • boolean $clear: Empty the table or add if exists
getLanguage (line 168)

Gets the actual language

  • return: Language
  • access: public
string getLanguage ()
getLanguageList (line 204)

Returns the avaiable languages from this adapter

  • access: public
void getLanguageList ()
getLocale (line 133)

Gets locale

  • access: public
Zend_Locale|null getLocale ()
getOptions (line 116)

Returns the adapters name and it's options

  • access: public
mixed getOptions ([string $optionKey = null])
  • string $optionKey: String returns this option null returns all options
isAvaiable (line 217)

Is the wished language avaiable ?

  • access: public
boolean isAvaiable (string|Zend_Locale $language)
  • string|Zend_Locale $language: Language to search for, identical with locale identifier, see Zend_Locale for more information
setLanguage (line 180)

Sets a new language

  • access: public
  • throws: Zend_Translate_Exception
void setLanguage (string $language)
  • string $language: Language to set.
setLocale (line 145)

Sets locale

  • access: public
  • throws: Zend_Translate_Exception
void setLocale (string|Zend_Locale $locale)
  • string|Zend_Locale $locale: Locale to set
setOptions (line 102)

Sets new adapter options

  • access: public
  • throws: Zend_Translate_Exception
void setOptions (array $options)
  • array $options: Adapter options
toString (line 319)

Returns the adapter name

  • access: public
  • abstract:
string toString ()

Redefined in descendants as:
translate (line 280)

Translates the given string returns the translation

  • access: public
string translate (string $translation, [string|Zend_Locale $language = null])
  • string $translation: Translation string
  • string|Zend_Locale $language: OPTIONAL Language to use, identical with locale identifier, see Zend_Locale for more information
_loadTranslationData (line 235)

Load translation data

  • access: protected
  • abstract:
void _loadTranslationData (string|Zend_Locale $language, mixed $data)
  • string|Zend_Locale $language
  • mixed $data

Redefined in descendants as:

Documentation generated on Thu, 18 Jan 2007 10:00:35 -0800 by phpDocumentor 1.3.1