Path

ez components / documentation / api reference / 2008.2.3 / translation


eZ Components 2008.2.3

Translation: ezcTranslationBackend

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

Interface: ezcTranslationBackend

Interface for Translation backends. [source]
This interface describes the methods that a Translation backend should implement.
For an example see ezcTranslationTsBackend.

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( string $locale, string $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. For the format see ezcTranslation::$translationMap.

Parameters

Name Type Description
$locale string  
$context string  

Throws

ClassDescription
TranslationException when a context is not available.

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 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: Mon, 11 May 2009