Basic adapter class for each translation source adapter
category | Zend |
---|---|
package | Zend_Translate |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Translate_Adapter |
_(string $messageId, string|\Zend_Locale $locale = null
) : string
string
Translation string
string
\Zend_Locale
(optional) Locale/Language to use, identical with locale identifier, @see Zend_Locale for more information
string
__construct(string|array|\Zend_Config $options = array()
) : void
string
array
\Zend_Config
Translation options for this adapter
\Zend_Translate_Exception |
---|
addTranslation(array|\Zend_Config $options = array()
) : \Zend_Translate_Adapter
This may be a new language or additional content for an existing language If the key 'clear' is true, then translations for the specified language will be replaced and added otherwise
array
\Zend_Config
Options and translations to be added
\Zend_Translate_Exception |
---|
\Zend_Translate_Adapter
Provides fluent interfaceclearCache(string $tag = null
) : void
string
Tag to clear when the default tag name is not used
getCache() : \Zend_Cache_Core
\Zend_Cache_Core
The set cachegetList() : array | null
array
null
getLocale() : \Zend_Locale | string | null
\Zend_Locale
string
null
getMessageId(string $message, string|\Zend_Locale $locale = null
) : string | array | false
string
Message to get the key for
string
\Zend_Locale
(optional) Language to return the message ids from
string
array
false
getMessageIds(string|\Zend_Locale $locale = null
) : array
string
\Zend_Locale
(optional) Language to return the message ids from
array
getMessages(string|\Zend_Locale $locale = null
) : array
string
\Zend_Locale
(optional) Language to return the messages from
array
getOptions(string|null $optionKey = null
) : integer | string | array | null
string
null
String returns this option null returns all options
integer
string
array
null
hasCache() : boolean
boolean
isAvailable(string|\Zend_Locale $locale) : boolean
isTranslated(string $messageId, boolean $original= false
, string|\Zend_Locale $locale= null
) : boolean
string
Translation string
boolean
(optional) Allow translation only for original language when true, a translation for 'en_US' would give false when it can be translated with 'en' only
string
\Zend_Locale
(optional) Locale/Language to use, identical with locale identifier, see Zend_Locale for more information
boolean
plural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null
) : string
see |
---|
string
Singular translation string
string
Plural translation string
integer
Number for detecting the correct plural
string
\Zend_Locale
(Optional) Locale/Language to use, identical with locale identifier, @see Zend_Locale for more information
string
removeCache() : void
setCache(\Zend_Cache_Core $cache)
\Zend_Cache_Core
Cache to store to
setLocale(string|\Zend_Locale $locale) : \Zend_Translate_Adapter
string
\Zend_Locale
Locale to set
\Zend_Translate_Exception |
---|
\Zend_Translate_Adapter
Provides fluent interfacesetOptions(array $options = array()
) : \Zend_Translate_Adapter
array
Adapter options
\Zend_Translate_Exception |
---|
\Zend_Translate_Adapter
Provides fluent interfacetoString() : string
inherited_from | \Zend_Translate_Adapter::toString() |
---|
string
toString() : string
string
translate(string|array $messageId, string|\Zend_Locale $locale = null
) : string
_loadTranslationData(string $filename, string $locale, array $options = array()
) : array
inherited_from | \Zend_Translate_Adapter::_loadTranslationData() |
---|
string
QT file to add, full path must be given for access
string
Locale/Language to add data for, identical with locale identifier, see Zend_Locale for more information
\Zend_Translation_Exception |
---|
array
_loadTranslationData(mixed $data, string|\Zend_Locale $locale, array $options = array()
) : array
mixed
string
\Zend_Locale
array
(optional)
array
_log(string $message, String $locale)
string
Message to log
String
Locale to log
_addTranslationData($options = array()
) : \Zend_Translate_Adapter
This may be a new language or additional data for an existing language If the options 'clear' is true, then the translation data for the specified language is replaced and added otherwise
see |
---|
\Zend_Translate_Exception |
---|
\Zend_Translate_Adapter
Provides fluent interface_contentElement($file, $data)
_endElement($file, $name)
_findEncoding($filename)
_getTagSupportForCache()
_startElement($file, $name, $attrib)
$_cache : \Zend_Cache_Core
null
$_translate : array
array()
$_automatic : boolean
true
$_cacheTags : boolean
false
$_cleared
array()
$_data
array()
$_file
false
$_routed : \array()
array()
$_scontent
null
$_source
null
$_stag
false
$_target
null
$_tcontent
null
$_transunit
null
$_ttag
true
LOCALE_DIRECTORY = 'directory'
constant | integer |
---|
LOCALE_FILENAME = 'filename'
constant | integer |
---|