original_string: 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());
      }
code: 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());
      }
code_tokens: 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 ( ) ) ; }
docstring: Enables the given language.
  
  @param int $id Language's ID
  @return void Redirects to previous page
docstring_tokens: Enables the given language .