public function set($langcode, $context)
    {
        $result = null;
        $this->hook->attach('translation.set.before', $langcode, $context, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $this->setContext($context);
        $this->setLangcode($langcode);

        $result = $this->prepareFiles($langcode);

        $this->hook->attach('translation.set.after', $langcode, $context, $result, $this);
        return (bool) $result;
    }
public function set($langcode, $context)
    {
        $result = null;
        $this->hook->attach('translation.set.before', $langcode, $context, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $this->setContext($context);
        $this->setLangcode($langcode);

        $result = $this->prepareFiles($langcode);

        $this->hook->attach('translation.set.after', $langcode, $context, $result, $this);
        return (bool) $result;
    }
public function set ( $ langcode , $ context ) { $ result = null ; $ this -> hook -> attach ( 'translation.set.before' , $ langcode , $ context , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ this -> setContext ( $ context ) ; $ this -> setLangcode ( $ langcode ) ; $ result = $ this -> prepareFiles ( $ langcode ) ; $ this -> hook -> attach ( 'translation.set.after' , $ langcode , $ context , $ result , $ this ) ; return ( bool ) $ result ; }
Set up a language
@param string|null $langcode
@param string|null $context
@return bool
Set up a language