* setConfiguration( * array( 'location' => 'usr/share/translations', * 'format' => 'translation-[LOCALE].xml' ) * ); * $w->initWriter( 'nl_NL' ); * $w->writeContext( ... ); * $w->deinitReader(); * ?> * * * @package Translation */ interface ezcTranslationContextWrite { /** * Initializes the writer * * Before starting to writer contexts to the writer, you should call * this method to initialize it. * * @param string $locale The locale to write from. * @throws TranslationException when the $tsLocationPath and * $tsFilenameFormat are not set before this * method is called. */ public function initWriter( $locale ); /** * Deinitializes the writer * * This method should be called after the last context was written to * cleanup resources. * * @throws TranslationException when the writer is not initialized with * initWriter(). */ public function deinitWriter(); /** * Stores a context * * This method stores the context that it received to the backend specified * storage place. * * @param string $context The context's name * @param array $data The context's translation map * @throws TranslationException when the writer is not initialized with * initWriter(). */ public function storeContext( $context, array $data ); } ?>