public function setLanguage(QueryBuilderInterface $query , $userLanguage = '' , $defaultLanguage = \DEFAULT_LANG) {
        $options = $this->getGateway()->getOptions();
        if(!empty($userLanguage)) {
            $options['language'] = $userLanguage;
        }
        $options['defaultLanguage'] = $defaultLanguage;
        
        $this->getGateway()->setOptions($options);
        
        return $query->newQuery();
    }
public function setLanguage(QueryBuilderInterface $query , $userLanguage = '' , $defaultLanguage = \DEFAULT_LANG) {
        $options = $this->getGateway()->getOptions();
        if(!empty($userLanguage)) {
            $options['language'] = $userLanguage;
        }
        $options['defaultLanguage'] = $defaultLanguage;
        
        $this->getGateway()->setOptions($options);
        
        return $query->newQuery();
    }
public function setLanguage ( QueryBuilderInterface $ query , $ userLanguage = '' , $ defaultLanguage = \ DEFAULT_LANG ) { $ options = $ this -> getGateway ( ) -> getOptions ( ) ; if ( ! empty ( $ userLanguage ) ) { $ options [ 'language' ] = $ userLanguage ; } $ options [ 'defaultLanguage' ] = $ defaultLanguage ; $ this -> getGateway ( ) -> setOptions ( $ options ) ; return $ query -> newQuery ( ) ; }
set gateway language options
@param QueryBuilderInterface $query
@param string $userLanguage
@param string $defaultLanguage
@return $this
set gateway language options