public function enableLanguage($ISO639_1, $name, $default_country_code, $default_lang = false)
    {
        $nb_language = new CNabuBuiltInLanguage();
        $nb_language->setISO6391($ISO639_1)
                    ->setName($name)
                    ->setDefaultCountryCode($default_country_code)
                    ->setEnabled(CNabuLanguage::LANGUAGE_ENABLED)
        ;

        $nb_site = $this->nb_engine->getHTTPServer()->getSite();
        $nb_site->setLanguage($nb_language);
        if ($default_lang) {
            $nb_site->setDefaultLanguage($nb_language);
        }

        return $nb_language;
    }
public function enableLanguage($ISO639_1, $name, $default_country_code, $default_lang = false)
    {
        $nb_language = new CNabuBuiltInLanguage();
        $nb_language->setISO6391($ISO639_1)
                    ->setName($name)
                    ->setDefaultCountryCode($default_country_code)
                    ->setEnabled(CNabuLanguage::LANGUAGE_ENABLED)
        ;

        $nb_site = $this->nb_engine->getHTTPServer()->getSite();
        $nb_site->setLanguage($nb_language);
        if ($default_lang) {
            $nb_site->setDefaultLanguage($nb_language);
        }

        return $nb_language;
    }
public function enableLanguage ( $ ISO639_1 , $ name , $ default_country_code , $ default_lang = false ) { $ nb_language = new CNabuBuiltInLanguage ( ) ; $ nb_language -> setISO6391 ( $ ISO639_1 ) -> setName ( $ name ) -> setDefaultCountryCode ( $ default_country_code ) -> setEnabled ( CNabuLanguage :: LANGUAGE_ENABLED ) ; $ nb_site = $ this -> nb_engine -> getHTTPServer ( ) -> getSite ( ) ; $ nb_site -> setLanguage ( $ nb_language ) ; if ( $ default_lang ) { $ nb_site -> setDefaultLanguage ( $ nb_language ) ; } return $ nb_language ; }
Fast method to add a language to the Site.
@param string $ISO639_1 ISO-639/1 code of language.
@param string $name Common name of the language
@param string $default_country_code Default country for this language
@return CNabuLanguage Returns a CNabuLanguage instance
Fast method to add a language to the Site .