deeplcom/deepl-php
Official DeepL API Client Library
v1.20.0
8.0M downloads/mo
#1109 most downloaded on Packagist
DeepL/deepl-php
What this package is like to depend on
Last release 12 days ago
11 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 33 of 33 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
33 releases · first in 2022
7 releases in the last 12 months
see the full history below
Release timeline
32 releases · Apr 2022 to Aug 2026Releases
latest 33-
v1.20.011 Aug 2026Release notes
Open source →[1.20.0] - 2026-08-11
Added
- Added support for using multiple glossaries in text and document translation
via theTranslateTextOptions::GLOSSARY_IDSand
TranslateDocumentOptions::GLOSSARY_IDSoptions (up to 5 glossary IDs). - Added support for style rules in document translation via the
TranslateDocumentOptions::STYLE_IDoption. - Added support for translation memories in document translation via the
TranslateDocumentOptions::TRANSLATION_MEMORY_IDand
TranslateDocumentOptions::TRANSLATION_MEMORY_THRESHOLDoptions. - Added support for the translation memory management endpoints in the
DeepLClientclass:getTranslationMemory(),
listTranslationMemorySegments(),deleteTranslationMemory(),
createTranslationMemoryImport(),uploadTranslationMemoryFile(),
createTranslationMemoryExport(),getTranslationMemoryJob(),
waitUntilTranslationMemoryJobDone(),downloadTranslationMemoryExport(),
importTranslationMemoryFromFilepath()and
exportTranslationMemoryToFilepath().
waitUntilTranslationMemoryJobDone()polls through the'awaiting_input'
status, which an import job keeps reporting for a while after its file has
been uploaded, and accepts an optional timeout in seconds, as do
importTranslationMemoryFromFilepath()and
exportTranslationMemoryToFilepath(). - Added new model classes
TranslationMemorySegment,
TranslationMemoryTargetSegment,TranslationMemorySegments,
TranslationMemorySegmentsOptions,TranslationMemoryImport,
TranslationMemoryExport,TranslationMemoryJoband
TranslationMemoryJobResult. - Added the
creationTimeandupdatedTimeproperties to
TranslationMemoryInfo.
Changed
- Requests to the pre-signed storage URLs used for translation memory import and export now
go through a separate HTTP client that is constructed without the DeepLAuthorization
header, instead of stripping it per request. Headers supplied viaTranslatorOptions::HEADERS
are no longer sent to those URLs either — only theUser-Agentand the per-request
Content-Type. Proxy settings are unaffected.
Release notes
Open source →Added
- Added support for using multiple glossaries in text and document translation
via the
TranslateTextOptions::GLOSSARY_IDSandTranslateDocumentOptions::GLOSSARY_IDSoptions (up to 5 glossary IDs). - Added support for style rules in document translation via the
TranslateDocumentOptions::STYLE_IDoption. - Added support for translation memories in document translation via the
TranslateDocumentOptions::TRANSLATION_MEMORY_IDandTranslateDocumentOptions::TRANSLATION_MEMORY_THRESHOLDoptions. - Added support for the translation memory management endpoints in the
DeepLClientclass:getTranslationMemory(),listTranslationMemorySegments(),deleteTranslationMemory(),createTranslationMemoryImport(),uploadTranslationMemoryFile(),createTranslationMemoryExport(),getTranslationMemoryJob(),waitUntilTranslationMemoryJobDone(),downloadTranslationMemoryExport(),importTranslationMemoryFromFilepath()andexportTranslationMemoryToFilepath().waitUntilTranslationMemoryJobDone()polls through the'awaiting_input'status, which an import job keeps reporting for a while after its file has been uploaded, and accepts an optional timeout in seconds, as doimportTranslationMemoryFromFilepath()andexportTranslationMemoryToFilepath(). - Added new model classes
TranslationMemorySegment,TranslationMemoryTargetSegment,TranslationMemorySegments,TranslationMemorySegmentsOptions,TranslationMemoryImport,TranslationMemoryExport,TranslationMemoryJobandTranslationMemoryJobResult. - Added the
creationTimeandupdatedTimeproperties toTranslationMemoryInfo.
Changed
- Requests to the pre-signed storage URLs used for translation memory import and export now
go through a separate HTTP client that is constructed without the DeepL
Authorizationheader, instead of stripping it per request. Headers supplied viaTranslatorOptions::HEADERSare no longer sent to those URLs either — only theUser-Agentand the per-requestContent-Type. Proxy settings are unaffected.
- Added support for using multiple glossaries in text and document translation
-
v1.19.024 Jun 2026Release notes
Open source →Added
- Added support for the
/v3/languagesand/v3/languages/resourcesendpoints
in theDeepLClientclass:getLanguagesForResource()andgetLanguageResources().
These return richer per-resource, per-feature language support than the v2
language endpoint, including newer languages and features. - Added new model classes
LanguageSupport,LanguageResource,LanguageFeature,
andResourceFeatureto represent the v3 language response shape.
Changed
- Migrated request bodies for
/v2/translate,/v2/glossaries, and
/v2/write/rephrasetoapplication/jsonwith correctly-typed fields
(e.g.textis sent as an array,show_billed_charactersas a boolean,
tag lists as arrays,translation_memory_thresholdas an integer). - Send
typeas a query parameter onGET /v2/languagesinstead of in the
request body. - Enabled OpenAPI request and response validation for the mock-server CI jobs.
Release notes
Open source →Added
- Added support for the
/v3/languagesand/v3/languages/resourcesendpoints in theDeepLClientclass:getLanguagesForResource()andgetLanguageResources(). These return richer per-resource, per-feature language support than the v2 language endpoint, including newer languages and features. - Added new model classes
LanguageSupport,LanguageResource,LanguageFeature, andResourceFeatureto represent the v3 language response shape.
Changed
- Migrated request bodies for
/v2/translate,/v2/glossaries, and/v2/write/rephrasetoapplication/jsonwith correctly-typed fields (e.g.textis sent as an array,show_billed_charactersas a boolean, tag lists as arrays,translation_memory_thresholdas an integer). - Send
typeas a query parameter onGET /v2/languagesinstead of in the request body. - Enabled OpenAPI request and response validation for the mock-server CI jobs.
- Added support for the
-
v1.18.009 Apr 2026Release notes
Open source →Added
- Added support for translation memories in text translation via
TranslateTextOptions::TRANSLATION_MEMORY_IDand
TranslateTextOptions::TRANSLATION_MEMORY_THRESHOLD. - Added
listTranslationMemories()method to theDeepLClientclass for
listing available translation memories. - Added new model class
TranslationMemoryInfoto represent translation memory data.
Fixed
- Set explicit image for
gitlab releaseCI job to avoid missing$HOMEissues.
Release notes
Open source →Added
- Added support for translation memories in text translation via
TranslateTextOptions::TRANSLATION_MEMORY_IDandTranslateTextOptions::TRANSLATION_MEMORY_THRESHOLD. - Added
listTranslationMemories()method to theDeepLClientclass for listing available translation memories. - Added new model class
TranslationMemoryInfoto represent translation memory data.
Fixed
- Set explicit image for
gitlab releaseCI job to avoid missing$HOMEissues.
- Added support for translation memories in text translation via
-
v1.17.026 Mar 2026Release notes
Open source →Added
- Added new language constants from January 2026 API release of 81 new languages.
- Added PHP 8.4 and 8.5 to CI test matrix.
- Added support for style rules CRUD endpoints in the
DeepLClientclass:createStyleRule(),getStyleRule(),updateStyleRuleName(),updateStyleRuleConfiguredRules(), anddeleteStyleRule(). - Added support for style rule custom instruction CRUD endpoints in the
DeepLClientclass:createStyleRuleCustomInstruction(),
getStyleRuleCustomInstruction(),updateStyleRuleCustomInstruction(), anddeleteStyleRuleCustomInstruction().
Please refer to the README for usage instructions.
Release notes
Open source →Added
- Added new language constants from January 2026 API release of 81 new languages.
- Added PHP 8.4 and 8.5 to CI test matrix.
- Added support for style rules CRUD endpoints in the
DeepLClientclass:createStyleRule(),getStyleRule(),updateStyleRuleName(),updateStyleRuleConfiguredRules(), anddeleteStyleRule(). - Added support for style rule custom instruction CRUD endpoints in the
DeepLClientclass:createStyleRuleCustomInstruction(),getStyleRuleCustomInstruction(),updateStyleRuleCustomInstruction(), anddeleteStyleRuleCustomInstruction(). Please refer to the README for usage instructions.
Changed
- Updated formality tests to accept either formal or informal output when using default formality, since the default formality is automatic.
- Updated
testModelType()to just check if themodel_type_usedis populated if themodel_typeis specified in the request - Updated
testMixedDirectionText()to add a missing</p>tag - Improved
NotFoundExceptionerror message by removing the misleading "check server_url" suggestion.
Fixed
- Skip
curl_closecall for PHP 8+.
-
v1.16.010 Dec 2025Release notes
Open source →Added
- Added
tag_handling_versionparameter totranslateText()specify which version of the tag handling algorithm to use. Options arev1andv2.
Release notes
Open source →Added
- Added
tag_handling_versionparameter totranslateText()specify which version of the tag handling algorithm to use. Options arev1andv2.
- Added
-
v1.15.010 Nov 2025Release notes
Open source →Added
- Added
custom_instructionsparameter totranslateText()to customize translation behavior with up to 10 instructions (max 300 characters each). Only supported for target languages:de,en,es,fr,it,ja,ko,zhand their variants. Note: using thecustom_instructionsparameter will use thequality_optimizedmodel type as the default. Requests combiningcustom_instructionsand thelatency_optimizedmodel type will be rejected.
Release notes
Open source →Added
- Added
custom_instructionsparameter totranslateText()to customize translation behavior with up to 10 instructions (max 300 characters each). Only supported for target languages:de,en,es,fr,it,ja,ko,zhand their variants. Note: using thecustom_instructionsparameter will use thequality_optimizedmodel type as the default. Requests combiningcustom_instructionsand thelatency_optimizedmodel type will be rejected.
- Added
-
v1.14.0no dateRelease notes
Open source →- Added support for the
GET /v3/style_rulesendpoint in the client library, the implementation can be found in theDeepLClientclass. Please refer to the README for usage instructions - Added
style_idoption totranslateText()which allows text translation with style rules. - Added new model classes:
StyleRuleInfo,ConfiguredRules, andCustomInstructionto support style rules functionality.
Release notes
Open source →Added
- Added support for the
GET /v3/style_rulesendpoint in the client library, the implementation can be found in theDeepLClientclass. Please refer to the README for usage instructions - Added
style_idoption totranslateText()which allows text translation with style rules. - Added new model classes:
StyleRuleInfo,ConfiguredRules, andCustomInstructionto support style rules functionality.
- Added support for the
-
v1.13.004 Nov 2025Release notes
Open source →Added
- Added
extraRequestParametersoption to text and document translation methods to pass arbitrary parameters in the request body. This can be used to access beta features or override built-in parameters (such astarget_lang,source_lang, etc.).
Release notes
Open source →Added
- Added
extraRequestParametersoption to text and document translation methods to pass arbitrary parameters in the request body. This can be used to access beta features or override built-in parameters (such astarget_lang,source_lang, etc.).
- Added
-
v1.12.025 Apr 2025Release notes
Open source →Added
- Added support for the /v3 Multilingual Glossary APIs in the client library while providing backwards compatability for the previous /v2 Glossary endpoints. Please refer to the README or upgrading_to_multilingual_glossaries.md for usage instructions.
Release notes
Open source →Added
- Added support for the /v3 Multilingual Glossary APIs in the client library while providing backwards compatability for the previous /v2 Glossary endpoints. Please refer to the README or upgrading_to_multilingual_glossaries.md for usage instructions.
-
v1.11.117 Jan 2025Release notes
Open source →Fixed
- Fixed
DeepLClientOptionswrongly inheriting fromTranslateTextOptions,
when it should beTranslatorOptions.- Thanks to VincentLanglet for the
report
- Thanks to VincentLanglet for the
Release notes
Open source →Fixed
- Fixed
DeepLClientOptionswrongly inheriting fromTranslateTextOptions, when it should beTranslatorOptions.- Thanks to VincentLanglet for the report
- Fixed
-
v1.11.016 Jan 2025Release notes
Open source →Added
- Added support for the Write API in the client library, the implementation
can be found in the
DeepLClientclass. Please refer to the README for usage instructions.
Changed
- The main functionality of the library is now also exposed via the
DeepLClientclass. Please change your code to use this over theTranslatorclass whenever convenient.
- Added support for the Write API in the client library, the implementation
can be found in the
-
v1.10.129 Nov 2024Release notes
Open source →Fixed
- Fixed the
TextResultconstructor to be compatible with pre-1.10 versions, to facilitate mocking- Thanks to VincentLanglet for #56
- Fixed a bug when generating the platform information with
php_uname.- Thanks to jochensengier for #57 and that-guy-iain + jimwins for the report.
- Fixed the
-
v1.10.015 Nov 2024Release notes
Open source →Added
- Added
MODEL_TYPEoption totranslateText()to use models with higher translation quality (available for some language pairs), or better latency. Options are'quality_optimized','latency_optimized', and'prefer_quality_optimized' - Added the
$modelTypeUsedfield totranslateText()response, that indicates the translation model used when theMODEL_TYPEoption is specified.
- Added
-
v1.9.017 Sep 2024 -
v1.8.026 Jun 2024Release notes
Open source →Added
- Added document minification as a feature before document translation, to allow
translation of large
docxorpptxfiles. For more info check the README.
- Added document minification as a feature before document translation, to allow
translation of large
-
v1.7.224 Apr 2024Release notes
Open source →Fixed
- Added a workaround for rare cases that the DeepL API responds with invalid
UTF-8 sequences. In these cases the
replacement character
"�" (U+FFFD) will replace invalid sequences.
- Thanks to VincentLanglet for #43
- Added a workaround for rare cases that the DeepL API responds with invalid
UTF-8 sequences. In these cases the
replacement character
"�" (U+FFFD) will replace invalid sequences.
-
v1.7.128 Feb 2024 -
v1.7.027 Feb 2024Release notes
Open source →Added
-
New language available: Arabic (
'ar'). Add language code constants and tests. Arabic is currently supported only for text translation; document translation support for Arabic is coming soon.Note: older library versions also support the new language, this update only adds new code constants.
Fixed
- Improve type of
translateTextfunction inTranslator- Thanks to VincentLanglet for #41
-
-
v1.6.003 Nov 2023Release notes
Open source →Added
- Add optional
contextparameter for text translation, that specifies additional context to influence translations, that is not translated itself.
Changed
- Added notice in Readme that starting in 2024 the library will drop support for PHP versions that are officially end-of-life.
- Add optional
-
v1.5.111 Sep 2023Release notes
Open source →Fixed
- Add
.gitattributesfile to exclude irrelevant files from package download.- Thanks to VincentLanglet for #30
- Internal CI improvements.
- Add
-
v1.5.026 Jun 2023Release notes
Open source →Added
- Allow users to supply their own custom HTTP client to the
Translatorobject, in order to configure timeouts, security features etc more granularly.- Thanks to VincentLanglet for the good input and work in #22
- Add curl version to the platform info in the user-agent header (will not be added if the user opts out).
Fixed
- Allow users to translate empty strings without throwing an error.
- Thanks to VincentLanglet for the work in #24
- Catch any exception thrown when computing the user-agent header and continue without failing the request.
- Allow users to supply their own custom HTTP client to the
-
v1.4.024 May 2023Release notes
Open source →Added
- Script to check our source code for license headers and a step for them in the CI.
- Added platform and node version information to the user-agent string that is sent with API calls, along with an opt-out.
- Add method for applications that use this library to identify themselves in API requests they make.
Fixed
- Fix getUsage request to be a HTTP GET request, not POST.
- Changed document translation to poll the server every 5 seconds. This should greatly reduce observed document translation processing time.
-
v1.3.026 Jan 2023Release notes
Open source →Added
-
New languages available: Korean (
'ko') and Norwegian (bokmål) ('nb'). Add language code constants and tests.Note: older library versions also support the new languages, this update only adds new code constants.
-
-
v1.2.125 Jan 2023Release notes
Open source →Fixed
- Also send options in API requests even if they are default values.
-
v1.2.001 Dec 2022Release notes
Open source →Changed
- Added dependency on
psr/log. As this package forms a PHP Standard Recommendation, we don't consider it to break backward-compatibility.
Fixed
- Added dependency on
-
v1.1.028 Sep 2022Release notes
Open source →Added
- Add new formality options:
'prefer_less'and'prefer_more'.
Changed
- Requests resulting in
503 Service Unavailableerrors are now retried. Attempting to download a document before translation is completed will now wait and retry (up to 5 times by default), rather than throwing an exception.
- Add new formality options:
-
v1.0.008 Sep 2022Release notes
Open source →Stable release.
Added
-
Add glossary management support.
-
New language available: Ukrainian (
'uk'). Add language code constant and tests.Note: older library versions also support new languages, this update only adds new code constant.
-
Add proxy support.
-
-
v0.4.112 Aug 2022Release notes
Open source →Changed
- Update contributing guidelines, we can now accept Pull Requests.
Fixed
-
v0.4.024 May 2022 -
v0.3.018 May 2022Release notes
Open source →Added
-
New languages available: Indonesian (
'id') and Turkish ('tr'). Add language code constants and tests.Note: older library versions also support the new languages, this update only adds new code constants.
-
-
v0.2.002 May 2022Release notes
Open source →Changed
- Remove
finalkeyword from class declarations to facilitate testing.
- Remove
-
v0.1.128 Apr 2022Release notes
Open source →Fixed
- Added minimum supported PHP version to composer.json.
- Fix cURL client issue: do not round timeouts to whole seconds.
- Fix cURL client issue: consider empty response a retryable-error.
- Check for and reject invalid
server_urloption.
-
v0.1.022 Apr 2022