## 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_CSV = 'csv'
AN_GETTEXT = 'gettext'
AN_TMX = 'tmx'
Method Summary
void addTranslation (string|array $options, string|Zend_Locale $locale, [boolean $clear = false])
Zend_Translate __construct (string $adapter, array $options, [string|Zend_Locale $locale = null])
Zend_Translate_Adapter getAdapter ()
array getList ()
Zend_Locale|null getLocale ()
boolean isAvailable (string|Zend_Locale $locale)
void setAdapter (string $adapter, array $options, [string|Zend_Locale $locale = null])
void setLocale (string|Zend_Locale $locale)
string translate (string $messageId, [string|Zend_Locale $locale = null])
string _ (string $messageId, [string|Zend_Locale $locale = null])
Methods
addTranslation (line 138)

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 (string|array $options, string|Zend_Locale $locale, [boolean $clear = false])

- string|array $options: Option for this adapter, depends on the adapter
- string|Zend_Locale $locale: Locale/Language to add to this adapter
- boolean $clear: If true the new translation is added to the existing one

Constructor __construct (line 61)

Generates the standard translation object

- access: public
- throws: Zend_Translate_Exception

Zend_Translate __construct (string $adapter, array $options, [string|Zend_Locale $locale = null])

- string $adapter: Adapter to use
- array $options: Options for this adapter to set Depends on the Adapter
- string|Zend_Locale $locale: OPTIONAL locale to use

getAdapter (line 121)

Returns the adapters name and it's options

- access: public

Zend_Translate_Adapter getAdapter ()
getList (line 171)

Returns all avaiable locales/anguages from this adapter

- access: public

array getList ()
getLocale (line 160)

Returns the actual set locale/language

- access: public

Zend_Locale|null getLocale ()
isAvailable (line 183)

is the wished language avaiable ?

- access: public

boolean isAvailable (string|Zend_Locale $locale)

- string|Zend_Locale $locale: Is the locale/language avaiable

setAdapter (line 75)

Sets a new adapter

- access: public
- throws: Zend_Translate_Exception

void setAdapter (string $adapter, array $options, [string|Zend_Locale $locale = null])

- string $adapter: Adapter to use
- array $options: Options for the adapter to set
- string|Zend_Locale $locale: OPTIONAL locale to use

setLocale (line 149)

Sets a new locale/language

- access: public

void setLocale (string|Zend_Locale $locale)

- string|Zend_Locale $locale: Locale/Language to set for translations

translate (line 209)

Translate the given string

- access: public

string translate (string $messageId, [string|Zend_Locale $locale = null])

- string $messageId: Original to translate
- string|Zend_Locale $locale: OPTIONAL locale/language to translate to

_ (line 196)

Translate the given string

- access: public

string _ (string $messageId, [string|Zend_Locale $locale = null])

- string $messageId: Original to translate
- string|Zend_Locale $locale: OPTIONAL locale/language to translate to

Class Constants
AN_ARRAY = 'array' (line 40)
AN_CSV = 'csv' (line 41)
AN_GETTEXT = 'gettext' (line 39)

Adapter names constants

AN_TMX = 'tmx' (line 42)

Documentation generated on Wed, 21 Feb 2007 12:03:07 -0800 by phpDocumentor 1.3.1