PHP code example of renziito / php-bing-translator-wrapper

1. Go to this page and download the library: Download renziito/php-bing-translator-wrapper 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/ */

    

renziito / php-bing-translator-wrapper example snippets



use \Renziito\BingTranslate;

$source = 'es';
$target = 'en';
$text = 'buenos días';

$trans = new BingTranslate();
$result = $trans->translate($text, $target, $source);

echo $result;

composer