/** * Sets the locale if it exists in the session and also exists in the locales option * * @return void */ public function setLocale() { $locale = session()->get($this->cmfConfig->locale_session_key()); app()->setLocale($locale ? $locale : $this->cmfConfig->default_locale()); }