## Apache Zeta Components Manual :: Docs For Class ezcTranslationBackend

### Translation::ezcTranslationBackend

### Interface ezcTranslationBackend

Interface for Translation backends.

This interface describes the methods that a Translation backend should implement.

For an example see ezcTranslationTsBackend.

Source for this file: /Translation/src/interfaces/backend_interface.php

Version: | //autogentag//

### 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 |

##### Exceptions:

Type | Description
--- | ---
`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 |

Documentation generated by phpDocumentor 1.4.3