concrete/src/Localization/Localization.php
public function getTranslatorAdapter($context)
    {
        if (!isset($this->contextLocales[$context])) {
            // Note: Do NOT call the t() function here as it might possibly
            // cause an infinte loop in case this happens with the active
            // context.
            throw new Exception(sprintf('Context locale has not been set for context: %s', $context));
        }
        $locale = $this->contextLocales[$context];

        return $this->getTranslatorAdapterRepository()->getTranslatorAdapter($context, $locale);
    }
public function getTranslatorAdapter($context)
    {
        if (!isset($this->contextLocales[$context])) {
            // Note: Do NOT call the t() function here as it might possibly
            // cause an infinte loop in case this happens with the active
            // context.
            throw new Exception(sprintf('Context locale has not been set for context: %s', $context));
        }
        $locale = $this->contextLocales[$context];

        return $this->getTranslatorAdapterRepository()->getTranslatorAdapter($context, $locale);
    }
public function getTranslatorAdapter ( $ context ) { if ( ! isset ( $ this -> contextLocales [ $ context ] ) ) { // Note: Do NOT call the t() function here as it might possibly // cause an infinte loop in case this happens with the active // context. throw new Exception ( sprintf ( 'Context locale has not been set for context: %s' , $ context ) ) ; } $ locale = $ this -> contextLocales [ $ context ] ; return $ this -> getTranslatorAdapterRepository ( ) -> getTranslatorAdapter ( $ context , $ locale ) ; }
Gets the translator adapter object for the given context from the
translator adapter repository.

@return \Concrete\Core\Localization\Translator\TranslatorAdapterInterface

@throws Exception in case trying to fetch an adapter for an unknown
context, an exception is thrown
Gets the translator adapter object for the given context from the translator adapter repository .