public function enable($id)
    {
        $this->loadModel('Locale.Languages');
        $language = $this->Languages->get($id);
        $language->set('status', true);

        if ($this->Languages->save($language)) {
            $this->Flash->success(__d('locale', 'Language successfully enabled!'));
        } else {
            $this->Flash->danger(__d('locale', 'Language could not be enabled, please try again.'));
        }

        $this->title(__d('locale', 'Enable Language'));
        $this->redirect($this->referer());
    }
public function enable($id)
    {
        $this->loadModel('Locale.Languages');
        $language = $this->Languages->get($id);
        $language->set('status', true);

        if ($this->Languages->save($language)) {
            $this->Flash->success(__d('locale', 'Language successfully enabled!'));
        } else {
            $this->Flash->danger(__d('locale', 'Language could not be enabled, please try again.'));
        }

        $this->title(__d('locale', 'Enable Language'));
        $this->redirect($this->referer());
    }
public function enable ( $ id ) { $ this -> loadModel ( 'Locale.Languages' ) ; $ language = $ this -> Languages -> get ( $ id ) ; $ language -> set ( 'status' , true ) ; if ( $ this -> Languages -> save ( $ language ) ) { $ this -> Flash -> success ( __d ( 'locale' , 'Language successfully enabled!' ) ) ; } else { $ this -> Flash -> danger ( __d ( 'locale' , 'Language could not be enabled, please try again.' ) ) ; } $ this -> title ( __d ( 'locale' , 'Enable Language' ) ) ; $ this -> redirect ( $ this -> referer ( ) ) ; }
Enables the given language.

@param int $id Language's ID
@return void Redirects to previous page
Enables the given language .