Class Zend_Translate

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

Located in /Translate.php (line 35)


	
			
Class Constant Summary
 AN_ARRAY = 'array'
 AN_GETTEXT = 'gettext'
Method Summary
 Zend_Translate __construct (string $adapter, mixed $options, [mixed $locale = null])
 void addTranslation (mixed $locale, mixed $options, [ $clear = false], boolean $empty)
 string getLanguage ()
 string getLanguageList ()
 Zend_Locale|null getLocale ()
 boolean isAvaiable (mixed $language)
 timestamp setAdapter (string $adapter, mixed $options, [mixed $locale = null])
 void setLanguage (string $language)
 void setLocale (mixed $locale)
 string translate (string $translation, [mixed $locale = null])
 string _ (string $translation, [mixed $locale = null])
Methods
Constructor __construct (line 57)

Generates the standard translation object

  • access: public
Zend_Translate __construct (string $adapter, mixed $options, [mixed $locale = null])
  • string $adapter: - Adapter to use
  • mixed $options: - Options for this adapter
  • mixed $locale:
    • OPTIONAL locale to use
addTranslation (line 140)

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
void addTranslation (mixed $locale, mixed $options, [ $clear = false], boolean $empty)
  • mixed $locale:
    • locale/language to add to this adapter
  • mixed $options: - option for this adapter depends on the adapter 'array' - the array to add 'gettext' - the gettext file inclusive the filename
  • boolean $empty: - add if the language already exists
  • $clear
getAdapter (line 121)

Returns the adapters name and it's options

  • access: public
Zend_Translate_Adapter getAdapter ()
getLanguage (line 183)

Gets the actual language

  • access: public
string getLanguage ()
getLanguageList (line 194)

Returns the avaiable languages from this adapter

  • access: public
string getLanguageList ()
getLocale (line 162)

Gets the actual locale/language

  • access: public
Zend_Locale|null getLocale ()
isAvaiable (line 206)

is the wished language avaiable ?

  • access: public
boolean isAvaiable (mixed $language)
  • mixed $language: - is locale or language avaiable
setAdapter (line 71)

Sets a new adapter

  • access: public
timestamp setAdapter (string $adapter, mixed $options, [mixed $locale = null])
  • string $adapter: - adapter to use
  • mixed $options: - Adapter options
  • mixed $locale:
    • OPTIONAL locale to use
setLanguage (line 173)

Sets the actual language, can differ from the set locale

  • access: public
void setLanguage (string $language)
  • string $language: - Language to set
setLocale (line 151)

Sets a new locale/language

  • access: public
void setLocale (mixed $locale)
  • mixed $locale: - Locale to set
translate (line 232)

Translate the given string

  • access: public
string translate (string $translation, [mixed $locale = null])
  • string $translation: - string to translate
  • mixed $locale:
    • OPTIONAL locale/language to translate to
_ (line 219)

Translate the given string

  • access: public
string _ (string $translation, [mixed $locale = null])
  • string $translation: - string to translate
  • mixed $locale:
    • OPTIONAL locale/language to translate to
Class Constants
AN_ARRAY = 'array' (line 40)
AN_GETTEXT = 'gettext' (line 39)

Adapter names constants

Documentation generated on Thu, 18 Jan 2007 10:01:22 -0800 by phpDocumentor 1.3.1