public function switchLocale($locale = null)
    {
        if (null === $locale) {
            $locale = $this->getLocale();
        } elseif ($this->getLocale() != $locale) {
            $this->setLocale($locale);
        }

        $this->locale->setLocale($locale);
        $this->translateAdapter->setLocale($locale);

        return \Gems_Cookies::setLocale($locale, $this->basepath->getBasePath());
    }
public function switchLocale($locale = null)
    {
        if (null === $locale) {
            $locale = $this->getLocale();
        } elseif ($this->getLocale() != $locale) {
            $this->setLocale($locale);
        }

        $this->locale->setLocale($locale);
        $this->translateAdapter->setLocale($locale);

        return \Gems_Cookies::setLocale($locale, $this->basepath->getBasePath());
    }
public function switchLocale ( $ locale = null ) { if ( null === $ locale ) { $ locale = $ this -> getLocale ( ) ; } elseif ( $ this -> getLocale ( ) != $ locale ) { $ this -> setLocale ( $ locale ) ; } $ this -> locale -> setLocale ( $ locale ) ; $ this -> translateAdapter -> setLocale ( $ locale ) ; return \ Gems_Cookies :: setLocale ( $ locale , $ this -> basepath -> getBasePath ( ) ) ; }
Switch to new locale

@param string $locale Current if omitted
@return boolean true if cookie was set
Switch to new locale