All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.10.1 - 2024-11-29
- Fixed the
TextResult
constructor 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.
1.10.0 - 2024-11-15
- Added
MODEL_TYPE
option 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
$modelTypeUsed
field totranslateText()
response, that indicates the translation model used when theMODEL_TYPE
option is specified.
1.9.0 - 2024-09-17
- Added
$billedCharacters
to the translate text response.
1.8.0 - 2024-06-24
- Added document minification as a feature before document translation, to allow
translation of large
docx
orpptx
files. For more info check the README.
1.7.2 - 2024-04-24
- 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
1.7.1 - 2024-02-28
- Update
VERSION
values to 1.7.1
1.7.0 - 2024-02-27
-
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.
- Improve type of
translateText
function inTranslator
- Thanks to VincentLanglet for #41
1.6.0 - 2023-11-03
- Add optional
context
parameter for text translation, that specifies additional context to influence translations, that is not translated itself.
- Added notice in Readme that starting in 2024 the library will drop support for PHP versions that are officially end-of-life.
1.5.1 - 2023-09-11
- Add
.gitattributes
file to exclude irrelevant files from package download.- Thanks to VincentLanglet for #30
- Internal CI improvements.
1.5.0 - 2023-06-26
- Allow users to supply their own custom HTTP client to the
Translator
object, 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).
- 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.
1.4.0 - 2023-05-24
- 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.
- 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.
1.3.0 - 2023-01-26
-
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.
1.2.1 - 2023-01-25
- Also send options in API requests even if they are default values.
1.2.0 - 2022-11-11
- Added dependency on
psr/log
. As this package forms a PHP Standard Recommendation, we don't consider it to break backward-compatibility.
- Change the type of the
TranslatorOptions::LOGGER
option toPsr\Log\LoggerInterface
, to correctly support PSR-3 loggers.
1.1.0 - 2022-09-28
- Add new formality options:
'prefer_less'
and'prefer_more'
.
- Requests resulting in
503 Service Unavailable
errors 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.
1.0.0 - 2022-09-08
Stable release.
-
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.
0.4.1 - 2022-08-12
- Update contributing guidelines, we can now accept Pull Requests.
0.4.0 - 2022-05-24
- Add support for document translation.
0.3.0 - 2022-05-18
-
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.
0.2.0 - 2022-05-02
- Remove
final
keyword from class declarations to facilitate testing.
0.1.1 - 2022-04-28
- 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_url
option.
0.1.0 - 2022-04-22
Initial version.