RainLab\Translate\Classes\Translator::setLocale PHP Метод

setLocale() публичный Метод

Changes the locale in the application and optionally stores it in the session.
public setLocale ( string $locale, boolean $remember = true ) : boolean
$locale string Locale to use
$remember boolean Set to false to not store in the session.
Результат boolean Returns true if the locale exists and is set.
    public function setLocale($locale, $remember = true)
    {
        if (!Locale::isValid($locale)) {
            return false;
        }
        App::setLocale($locale);
        $this->activeLocale = $locale;
        if ($remember) {
            $this->setSessionLocale($locale);
        }
        return true;
    }