/**
* Changes the locale in the application and optionally stores it in the session.
* @param string $locale Locale to use
* @param boolean $remember Set to false to not store in the session.
* @return 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;
}