bedita/i18n-deepl

BEdita I18n Deepl 插件支持 PHP >= 7.4

v1.0.1 2024-04-17 11:46 UTC

This package is auto-updated.

Last update: 2024-09-17 12:52:35 UTC


README

Github Actions codecov phpstan Scrutinizer Code Quality image image

安装

您可以使用 composer 将此插件安装到您的应用程序中。

安装 composer 包的推荐方式是

composer require bedita/i18n-deepl

注意:支持的 php 版本为 >= 7.4。

DeepL 翻译器

此插件使用 DeepL Translator 通过 deepl-php 翻译文本。

使用示例

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!']]