/** * @param Locale $locale * * @return $this */ public function setLocale($locale) { if (!$locale instanceof Locale) { $locale = Locale::objectify($locale, array($this)); } $this->locale = $locale; return $this; }
/** * Change current locale * * @param string $code Locale code 'en_US' etc * * @return $this */ public function change($code) { $this->locale->setActive($code); $this->data['active'] = $this->locale->getActive(); return $this; }