lib/ezi18n/classes/eztstranslator.php
static function initialize( $context, $locale, $filename, $useCache = true )
    {
        $instance = false;
        $file = $locale . '/' . $filename;
        if ( !empty( $GLOBALS['eZTSTranslationTables'][$file] ) )
        {
            $instance = $GLOBALS['eZTSTranslationTables'][$file];
            if ( $instance->hasInitializedContext( $context ) )
            {
                return $instance;
            }
        }

        eZDebug::createAccumulatorGroup( 'tstranslator', 'TS translator' );
        eZDebug::accumulatorStart( 'tstranslator_init', 'tstranslator', 'TS init' );
        if ( !$instance )
        {
            $instance = new eZTSTranslator( $locale, $filename, $useCache );
            $GLOBALS['eZTSTranslationTables'][$file] = $instance;
            $manager = eZTranslatorManager::instance();
            $manager->registerHandler( $instance );
        }
        $instance->load( $context );
        eZDebug::accumulatorStop( 'tstranslator_init' );
        return $instance;
    }
static function initialize( $context, $locale, $filename, $useCache = true )
    {
        $instance = false;
        $file = $locale . '/' . $filename;
        if ( !empty( $GLOBALS['eZTSTranslationTables'][$file] ) )
        {
            $instance = $GLOBALS['eZTSTranslationTables'][$file];
            if ( $instance->hasInitializedContext( $context ) )
            {
                return $instance;
            }
        }

        eZDebug::createAccumulatorGroup( 'tstranslator', 'TS translator' );
        eZDebug::accumulatorStart( 'tstranslator_init', 'tstranslator', 'TS init' );
        if ( !$instance )
        {
            $instance = new eZTSTranslator( $locale, $filename, $useCache );
            $GLOBALS['eZTSTranslationTables'][$file] = $instance;
            $manager = eZTranslatorManager::instance();
            $manager->registerHandler( $instance );
        }
        $instance->load( $context );
        eZDebug::accumulatorStop( 'tstranslator_init' );
        return $instance;
    }
static function initialize ( $ context , $ locale , $ filename , $ useCache = true ) { $ instance = false ; $ file = $ locale . '/' . $ filename ; if ( ! empty ( $ GLOBALS [ 'eZTSTranslationTables' ] [ $ file ] ) ) { $ instance = $ GLOBALS [ 'eZTSTranslationTables' ] [ $ file ] ; if ( $ instance -> hasInitializedContext ( $ context ) ) { return $ instance ; } } eZDebug :: createAccumulatorGroup ( 'tstranslator' , 'TS translator' ) ; eZDebug :: accumulatorStart ( 'tstranslator_init' , 'tstranslator' , 'TS init' ) ; if ( ! $ instance ) { $ instance = new eZTSTranslator ( $ locale , $ filename , $ useCache ) ; $ GLOBALS [ 'eZTSTranslationTables' ] [ $ file ] = $ instance ; $ manager = eZTranslatorManager :: instance ( ) ; $ manager -> registerHandler ( $ instance ) ; } $ instance -> load ( $ context ) ; eZDebug :: accumulatorStop ( 'tstranslator_init' ) ; return $ instance ; }
Initialize the ts translator and context if this is not already done

@param string $context
@param string $locale
@param string $filename
@param bool $useCache
@return eZTSTranslator
Initialize the ts translator and context if this is not already done