PHP code example of bedita / i18n-aws

1. Go to this page and download the library: Download bedita/i18n-aws 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-aws example snippets


use BEdita\I18n\Aws\Core\Translator;

$translator = new Translator();
$translator->setup([
    'profile' => 'your-profile', // the AWS profile
    'region' => 'your-region', // the AWS region
]);
$result = $translator->translate(['Hello world!'], 'en', 'it');
// $result is an array, i.e ['translation' => ['Ciao mondo!']]