Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Basic adapter class for each translation source adapter
LOCALE_DIRECTORY = 'directory'
Scans for the locale within the name of the directory
Details LOCALE_FILENAME = 'filename'
Scans for the locale within the name of the file
Detailsboolean $_automatic = 'true'Shows if locale detection is in automatic level
DetailsZend_Cache_Core $_cache = 'null'Internal cache for all adapters
Detailsboolean $_cacheTags = 'false'Internal value to remember if cache supports tags
Detailsarray $_options = 'array'Array with all options, each adapter can have own additional options 'clear' => when true, clears already loaded translations when adding new files 'content' => content to translate or file or directory with content 'disableNotices' => when true, omits notices from being displayed 'ignore' => a prefix for files and directories which are not being added 'locale' => the actual set locale to use 'log' => a instance of Zend_Log where logs are written to 'logMessage' => message to be logged 'logUntranslated' => when true, untranslated messages are not logged 'reload' => reloads the cache by reading the content again 'scan' => searches for translation files using the LOCALE constants 'tag' => tag to use for the cache
Detailsarray() $_routed = 'array'Internal value to see already routed languages
Detailsarray $_translate = 'array'Translation table
Details_(
string $messageId, string|Zend_Locale $locale
=
null
)
:
stringTranslates the given string returns the translation
Details__construct(
array|Zend_Config $options
=
array
)
:
voidGenerates the adapter
Details_addTranslationData(
$options
=
array
)
:
Zend_Translate_AdapterInternal function for adding translation data
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
Details_getTagSupportForCache(
)
:
Internal method to check if the given cache supports tags
Details_loadTranslationData(
mixed $data, string|Zend_Locale $locale, array $options
=
array
)
:
arrayLoad translation data
Details_log(
string $message, String $locale
)
:
Logs a message when the log option is set
DetailsaddTranslation(
array|Zend_Config $options
=
array
)
:
Zend_Translate_AdapterAdd translations
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
DetailsclearCache(
string $tag
=
null
)
:
voidClears all set cache data
DetailsgetCache(
)
:
Zend_Cache_CoreReturns the set cache
DetailsgetList(
)
:
arrayReturns the available languages from this adapter
DetailsgetLocale(
)
:
Zend_Locale|string|nullGets locale
DetailsgetMessageId(
string $message, string|Zend_Locale $locale
=
null
)
:
string|array|falseReturns the message id for a given translation If no locale is given, the actual language will be used
DetailsgetMessageIds(
string|Zend_Locale $locale
=
null
)
:
arrayReturns all available message ids from this adapter If no locale is given, the actual language will be used
DetailsgetMessages(
string|Zend_Locale $locale
=
null
)
:
arrayReturns all available translations from this adapter If no locale is given, the actual language will be used If 'all' is given the complete translation dictionary will be returned
DetailsgetOptions(
string|null $optionKey
=
null
)
:
integer|string|array|nullReturns the adapters name and it's options
DetailshasCache(
)
:
booleanReturns true when a cache is set
DetailsisAvailable(
string|Zend_Locale $locale
)
:
booleanIs the wished language available ?
DetailsisTranslated(
string $messageId, boolean $original
=
false, string|Zend_Locale $locale
=
null
)
:
booleanChecks if a string is translated within the source or not returns boolean
Detailsplural(
string $singular, string $plural, integer $number, string|Zend_Locale $locale
=
null
)
:
stringTranslates the given string using plural notations Returns the translated string
DetailsremoveCache(
)
:
voidRemoves any set cache
DetailssetCache(
Zend_Cache_Core $cache
)
:
Sets a cache for all Zend_Translate_Adapters
DetailssetLocale(
string|Zend_Locale $locale
)
:
Zend_Translate_AdapterSets locale
DetailssetOptions(
array $options
=
array
)
:
Zend_Translate_AdapterSets new adapter options
DetailstoString(
)
:
stringReturns the adapter name
Detailstranslate(
string|array $messageId, string|Zend_Locale $locale
=
null
)
:
stringTranslates the given string returns the translation
Details