Skip to content

haltuf/deepl-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepL API wrapper for PHP

example workflow

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

About

Unofficial DeepL API wrapper in PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages