Simple PHP Library for DeepL API. You can translate one or multiple text strings (up to 50) per request.
๐ฌ๐ง๐ฉ๐ช๐ซ๐ท๐ช๐ธ๐ต๐น๐ฎ๐น๐ท๐บ๐ฏ๐ต๐จ๐ณ๐ต๐ฑ๐ณ๐ฑ๐ธ๐ช๐ฉ๐ฐ๐ซ๐ฎ๐ฌ๐ท๐จ๐ฟ๐ท๐ด๐ญ๐บ๐ธ๐ฐ๐ง๐ฌ๐ธ๐ฎ๐ฑ๐น๐ฑ๐ป๐ช๐ช๐ฒ๐น
Use composer if you want to use this library in your project.
composer require babymarkt/deepl-php-lib
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'];
}
Run PHP_CodeSniffer Tests:
composer cs
Run PHPMD Tests:
composer md
Run PHPUnit Tests:
composer test
Run all tests:
composer test:all
The MIT License (MIT). Please see License File for more information.