Skip to content

๐Ÿง  DeepL API Client Library supporting PHP >= 5.3 && PHP < 8.0

License

Notifications You must be signed in to change notification settings

replay42/deepl-php-lib

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

89 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

deepl-php-lib

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Simple PHP Library for DeepL API. You can translate one or multiple text strings (up to 50) per request.

๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ซ๐Ÿ‡ท๐Ÿ‡ช๐Ÿ‡ธ๐Ÿ‡ต๐Ÿ‡น๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ‡ท๐Ÿ‡บ๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ‡จ๐Ÿ‡ณ๐Ÿ‡ต๐Ÿ‡ฑ๐Ÿ‡ณ๐Ÿ‡ฑ๐Ÿ‡ธ๐Ÿ‡ช๐Ÿ‡ฉ๐Ÿ‡ฐ๐Ÿ‡ซ๐Ÿ‡ฎ๐Ÿ‡ฌ๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡ฟ๐Ÿ‡ท๐Ÿ‡ด๐Ÿ‡ญ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡ฐ๐Ÿ‡ง๐Ÿ‡ฌ๐Ÿ‡ธ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡น๐Ÿ‡ฑ๐Ÿ‡ป๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡ฒ๐Ÿ‡น

Install

Use composer if you want to use this library in your project.

composer require babymarkt/deepl-php-lib

Usage

Create an instance with your auth key:

$authKey = '<AUTH KEY>';
$deepl   = new DeepL($authKey);

Translate one Text:

$translatedText = $deepl->translate('Hallo Welt', 'de', 'en');
echo $translatedText;

Translate multiple Texts:

$text = array(
    'Hallo Welt',
    'Wie geht es dir',
    'Macht doch einfach mal'
);

$translations = $deepl->translate($text, 'de', 'en');

foreach ($translations as $translation) {
    echo $translation['text'];
}

Testing

Run PHP_CodeSniffer Tests:

composer cs

Run PHPMD Tests:

composer md

Run PHPUnit Tests:

composer test

Run all tests:

composer test:all

Credits

License

The MIT License (MIT). Please see License File for more information.

About

๐Ÿง  DeepL API Client Library supporting PHP >= 5.3 && PHP < 8.0

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%