original_string: public function setLanguageDatabase(string $language) : bool
      {
          $pdo = $this->bot->getPDO();
  
          // Update the language in the database
          $sth = $pdo->prepare('UPDATE ' . $this->user_table . ' SET language = :language WHERE '
                                               . $this->id_column . ' = :id');
          $sth->bindParam(':language', $language);
  
          $chat_id = $this->bot->chat_id;
          $sth->bindParam(':id', $chat_id);
  
          try {
              $sth->execute();
          } catch (\PDOException $e) {
              throw new BotException($e->getMessage());
          }
  
          $this->language = $language;
  
          return true;
      }
code: public function setLanguageDatabase(string $language) : bool
      {
          $pdo = $this->bot->getPDO();
  
          // Update the language in the database
          $sth = $pdo->prepare('UPDATE ' . $this->user_table . ' SET language = :language WHERE '
                                               . $this->id_column . ' = :id');
          $sth->bindParam(':language', $language);
  
          $chat_id = $this->bot->chat_id;
          $sth->bindParam(':id', $chat_id);
  
          try {
              $sth->execute();
          } catch (\PDOException $e) {
              throw new BotException($e->getMessage());
          }
  
          $this->language = $language;
  
          return true;
      }
code_tokens: public function setLanguageDatabase ( string $ language ) : bool { $ pdo = $ this -> bot -> getPDO ( ) ; // Update the language in the database $ sth = $ pdo -> prepare ( 'UPDATE ' . $ this -> user_table . ' SET language = :language WHERE ' . $ this -> id_column . ' = :id' ) ; $ sth -> bindParam ( ':language' , $ language ) ; $ chat_id = $ this -> bot -> chat_id ; $ sth -> bindParam ( ':id' , $ chat_id ) ; try { $ sth -> execute ( ) ; } catch ( \ PDOException $ e ) { throw new BotException ( $ e -> getMessage ( ) ) ; } $ this -> language = $ language ; return true ; }
docstring: \brief Set the current user language in database and internally.
  \details Save it into database first.
  @param string $language The language to set.
  @return bool On sucess, return true, throws exception otherwise.
docstring_tokens: \ brief Set the current user language in database and internally . \ details Save it into database first .