haltuf / deepl-php-api
Unofficial DeepL API wrapper for PHP
Installs: 3 107
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-curl: *
Requires (Dev)
- mockery/mockery: ^1.3
- nette/tester: ^2.3
This package is auto-updated.
Last update: 2024-12-29 06:40:10 UTC
README
Unofficial, no-dependency library for calling DeepL API. Requires curl extension. Supports PHP >= 7.1, works for PHP 8.0, too.
Currently Work-In_progress. Works for basic use cases, no support for xml parameters yet.
Installation
composer require haltuf/deepl-php-api
Usage
Create Api
object and call translate
method.
use Haltuf\DeepL\Api; use Haltuf\DeepL\Language; $api = new Api('my_key'); $translation = $api->translate('Text to be translated', Language::CZECH, Language::ENGLISH); echo $translation->getText();
Outputs: Text, který má být přeložen