Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.49 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.49 KB

BEdita I18n Deepl plugin

Github Actions codecov phpstan Scrutinizer Code Quality image image

Installation

You can install this plugin into your application using composer.

The recommended way to install composer packages is:

composer require bedita/i18n-deepl

Note: php version supported is >= 7.4.

DeepL Translator

This plugin uses DeepL Translator to translate texts, via deepl-php.

Usage example:

use BEdita\I18n\Deepl\Core\Translator;

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