2.0.0 (2026-07-06)
Features Added
- Added support for the
2026-03-01service API version, which is now the default. - Added image translation support:
- Added the
BatchOptionsmodel with thetranslateTextWithinImageproperty, and theoptionsproperty onTranslationBatch, to enable translation of text embedded within images for batch requests. - Added
beginTranslation(List<DocumentTranslationInput>, Boolean)convenience overloads toDocumentTranslationClientandDocumentTranslationAsyncClientto enable batch image translation without constructing aTranslationBatch/BatchOptions. - Added the
translateTextWithinImageparameter toSingleDocumentTranslationClient.translateandSingleDocumentTranslationAsyncClient.translatefor single document requests. - Added image scan reporting to
DocumentStatusResult:imageCharacterDetectedCount,imageChargedCount,totalImageScansSucceededCount, andtotalImageScansFailedCount. - Added image scan totals to
TranslationStatusSummary:totalImageScansSucceededCount,totalImageScansFailedCount, andtotalImagesChargedCount.
- Added the
- Added custom translation model support:
- Added the
deploymentNameproperty toTranslationTargetto specify the deployment name of the custom translation model for a batch translation request. - Added the
deploymentNameproperty toDocumentStatusResult, exposing the deployment name of the custom translation model used for the translation. - Added the
deploymentNameparameter toSingleDocumentTranslationClient.translateandSingleDocumentTranslationAsyncClient.translatefor single document translation requests.
- Added the
- Added the
DocumentTranslateOptionsmodel andtranslate(String, DocumentTranslateContent, DocumentTranslateOptions)convenience overloads toSingleDocumentTranslationClientandSingleDocumentTranslationAsyncClient, grouping the optionalsourceLanguage,category,deploymentName,allowFallback, andtranslateTextWithinImagesettings into a single options bag.
Breaking Changes
- Renamed
DocumentStatusResult.getCharacterCharged()togetCharacterChargedCount()for naming consistency with the other count properties. Existing callers must update to the new method name. - Replaced the
SingleDocumentTranslationClient.translateandSingleDocumentTranslationAsyncClient.translateconvenience overloadtranslate(String, DocumentTranslateContent, String, String, Boolean)withtranslate(String, DocumentTranslateContent, String, String, String, Boolean, Boolean), adding thedeploymentNameandtranslateTextWithinImageparameters (positioned aftercategoryandallowFallbackrespectively). Existing callers of the previous overload must update their call sites to the new signature. - Made the
typeparameter required ongetSupportedFormats, matching the service contract. Removed the no-argumentgetSupportedFormats()overload fromDocumentTranslationClientandDocumentTranslationAsyncClient; callers must now pass aFileFormatType(for example,getSupportedFormats(FileFormatType.DOCUMENT)). - Changed the underlying values of
FileFormatType.DOCUMENTandFileFormatType.GLOSSARYfromdocument/glossarytoDocument/Glossaryto match the service. The enum constant names are unchanged.