bedita / i18n-aws
BEdita I18n Aws plugin supporting PHP >= 8.3
v1.1.0
2024-12-06 13:59 UTC
Requires
- php: >=8.3
- aws/aws-sdk-php: ^3.285
- bedita/i18n: ^5.1.0
- cakephp/utility: ^4.5
Requires (Dev)
- cakephp/cakephp: ^4.5
- cakephp/cakephp-codesniffer: ~4.7.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-12-09 13:19:17 UTC
README
Installation
You can install this plugin into your application using composer.
The recommended way to install composer packages is:
composer require bedita/i18n-aws
Note: php version supported is >= 8.3.
Amazon Translate
This plugin uses AWS Translate to translate texts, via aws-sdk-php.
Usage example:
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!']]