Path

ez components / documentation / api reference / 1.1 / translation


eZ Components 1.1

Translation: ezcTranslationBackend

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Interface: ezcTranslationBackend

Interface for Translation backends. [source]
This interface describes the methods that a Translation backend should implement.
Example:

Method Summary

public array getContext( $locale, $context )
Returns an array with translation data for the context $context and the locale $locale.
public void setOptions( $configurationData )
Sets the backend specific $configurationData.

Methods

getContext

array getContext( mixed $locale, mixed $context )
Returns an array with translation data for the context $context and the locale $locale.
This method returns an array describing the map used for translation of text.

Throws

ClassDescription
TranslationException when a context is not available.

See also:

ezcTranslation::$translationMap for the format..


setOptions

void setOptions( mixed $configurationData )
Sets the backend specific $configurationData.
$configurationData should be an implementation of ezcBaseOptions (or, for sake of backwards compatibility an associative array). See {@see ezcTranslationTsBackend} for an example implementation.
Each implementor must document the options that it accepts and throw an ezcBaseConfigException with the ezcBaseConfigException::UNKNOWN_CONFIG_SETTING type if an option is not supported.

Parameters

Name Type Description
$configurationData mixed  

Last updated: Wed, 28 Nov 2007