Documentation

TranslationApi extends AbstractApi
in package

Translators can work with entirely untranslated project or you can pre-translate the files to ease the translations process.

Use API to pre-translate files via Machine Translation or Translation Memory, upload your existing translations, and download translations. Pre-translate and build are asynchronous operations and shall be completed with sequence of API methods.

Table of Contents

Methods

applyPreTranslation()  : PreTranslation|null
Apply Pre-Translation
buildProject()  : TranslationProjectBuild|null
Build Project Translation
buildProjectDirectoryTranslation()  : TranslationProjectDirectory|null
Build Project Directory Translation
buildProjectFileTranslation()  : DownloadFile|null
Build Project File Translation
deleteProjectBuild()  : mixed
Cancel Build
downloadProjectBuild()  : DownloadFile|null
Download Project Translations
exportProjectTranslation()  : DownloadFile
Export Project Translation
getPreTranslation()  : PreTranslation|null
Pre-Translation Status
getProjectBuilds()  : ModelCollection
List Project Builds
getProjectBuildStatus()  : TranslationProjectBuild|null
Check Project Build Status
uploadTranslations()  : array<string|int, mixed>
Upload Translations

Methods

applyPreTranslation()

Apply Pre-Translation

public applyPreTranslation(int $projectId, array<string|int, mixed> $params) : PreTranslation|null
Parameters
$projectId : int
$params : array<string|int, mixed>

string[] $params[languageIds] required
int[] $params[fileIds] required
string $params[method]
int $params[engineId]
string $params[autoApproveOption]
boolean $params[duplicateTranslations] Works only with TM pre-translation method
boolean $params[translateUntranslatedOnly] Works only with TM pre-translation method
boolean $params[translateWithPerfectMatchOnly] Works only with TM pre-translation method

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
PreTranslation|null

buildProject()

Build Project Translation

public buildProject(int $projectId[, array<string|int, mixed> $params = [] ]) : TranslationProjectBuild|null
Parameters
$projectId : int
$params : array<string|int, mixed> = []

integer $params[branchId]
array $params[targetLanguageIds]
bool $params[skipUntranslatedStrings] true value can't be used with skipUntranslatedFiles=true in same request
bool $params[skipUntranslatedFiles] true value can't be used with skipUntranslatedStrings=true in same request
bool $params[exportApprovedOnly]
integer $params[exportWithMinApprovalsCount]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
TranslationProjectBuild|null

buildProjectDirectoryTranslation()

Build Project Directory Translation

public buildProjectDirectoryTranslation(int $projectId, int $directoryId[, array<string|int, mixed> $params = [] ]) : TranslationProjectDirectory|null
Parameters
$projectId : int
$directoryId : int
$params : array<string|int, mixed> = []

string[] $params[targetLanguageIds] Leave this field empty to build all target languages
boolean $params[skipUntranslatedStrings] Default: false
boolean $params[skipUntranslatedFiles] Default: false
boolean $params[exportApprovedOnly] Default: false
boolean $params[preserveFolderHierarchy] Default: false

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
TranslationProjectDirectory|null

buildProjectFileTranslation()

Build Project File Translation

public buildProjectFileTranslation(int $projectId, int $fileId[, array<string|int, mixed> $params = [] ][, string|null $ifNoneMatch = null ]) : DownloadFile|null
Parameters
$projectId : int
$fileId : int
$params : array<string|int, mixed> = []
$ifNoneMatch : string|null = null
Tags
link

API Documentation

link

API Documentation Enterprise

Return values
DownloadFile|null

string $params[targetLanguageId]
boolean $params[exportAsXliff]
boolean $params[skipUntranslatedStrings] true value can't be used with skipUntranslatedFiles=true in same request
boolean $params[skipUntranslatedFiles] true value can't be used with skipUntranslatedStrings=true in same request
boolean $params[exportApprovedOnly]

exportProjectTranslation()

Export Project Translation

public exportProjectTranslation(int $projectId[, array<string|int, mixed> $params = [] ]) : DownloadFile
Parameters
$projectId : int
$params : array<string|int, mixed> = []

string $params[targetLanguageId] required
string $params[format]
int[] $params[branchIds] Note: Can't be used with directoryIds or fileIds in same request
int[] $params[directoryIds] Note: Can't be used with branchIds or fileIds in same request
int[] $params[fileIds] Note: Can't be used with branchIds or directoryIds in same request
bool $params[skipUntranslatedStrings] Note: Can't be used with skipUntranslatedFiles in same request
bool $params[skipUntranslatedFiles] Note: Can't be used with skipUntranslatedStrings in same request
bool $params[exportApprovedOnly]
integer $params[exportWithMinApprovalsCount]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
DownloadFile

uploadTranslations()

Upload Translations

public uploadTranslations(int $projectId, string $languageId, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$projectId : int
$languageId : string
$params : array<string|int, mixed>

integer $params[storageId] required
integer $params[fileId] required
bool $params[importEqSuggestions]
bool $params[autoApproveImported]

Tags
link

API Documentation

link

API Documentation Enterprise

Return values
array<string|int, mixed>

        
On this page

Search results