PHP code example of gemy / chat-gpt-trans

1. Go to this page and download the library: Download gemy/chat-gpt-trans library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gemy / chat-gpt-trans example snippets


use Gemy\ChatGptTrans\App\ChatGptTrans;

class HomeController extends Controller
{
    public function transText()
    {
         $string = "مساج الحجارة الساخنة والأعشاب";
         /// If you don`t need to save it in a file, write it like this
         $text = new ChatGptTrans('en',false);
         ////
          $text = new ChatGptTrans('en',true);
    }
}