Sophie

Sophie

distrib > Mageia > 3 > x86_64 > by-pkgid > 81f82e2ce4ccb89d994f06d94d8d1394 > files > 17

ezcomponents-Translation-1.3.2-3.mga3.noarch.rpm

<?php
require_once 'tutorial_autoload.php';

$cacheObj = new ezcCacheStorageFileArray( dirname( __FILE__ ). '/translations-cache' );
$backend = new ezcTranslationCacheBackend( $cacheObj );

$manager = new ezcTranslationManager( $backend );
$headersContext = $manager->getContext( 'nb_NO', 'tutorial/headers' );
$descriptionContext = $manager->getContext( 'nb_NO', 'tutorial/descriptions' );

echo $headersContext->getTranslation( 'header1' ), "\n";
echo $descriptionContext->getTranslation( 'desc1' ), "\n";
echo $descriptionContext->getTranslation( 'desc2' ), "\n";
?>