PHP code example of bedita / i18n-microsoft
1. Go to this page and download the library: Download bedita/i18n-microsoft 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/ */
bedita / i18n-microsoft example snippets
use BEdita\I18n\Microsoft\Core\Translator;
$translator = new Translator();
$translator->setup([
'auth_key' => 'your-auth-key', // Microsoft Translator KEY 1
'location' => 'your-location', // Microsoft Translator Location/Region i.e. westeurope
]);
$result = $translator->translate(['Hello world!'], 'en', 'it');
// $result is an array, i.e ['translation' => ['Ciao mondo!']]