TranslationMemoryApi
extends AbstractApi
in package
Translation Memory (TM) is a vault of translations that were previously made in other projects.
Those translations can be reused to speed up the translation process. Every translation made in the project is automatically added to the project Translation Memory. Use API to create, upload, download, or remove specific TM. Translation Memory export and import are asynchronous operations and shall be completed with sequence of API methods.
Table of Contents
Methods
- checkExportStatus() : TranslationMemoryExport|null
- Check TM Export Status
- checkImportStatus() : TranslationMemoryImport|null
- Check TM Import Status
- clear() : mixed
- Clear TM
- create() : mixed
- Add TM
- delete() : mixed
- Delete TM
- download() : DownloadFile|null
- Download TM
- export() : TranslationMemoryExport|null
- Export TM
- get() : TranslationMemory|null
- Get TM Info
- import() : TranslationMemoryImport|null
- Import TM
- list() : ModelCollection
- List TMs
- update() : TranslationMemory|null
- Edit TM Info
Methods
checkExportStatus()
Check TM Export Status
public
checkExportStatus(int $translationMemoryId, string $exportId) : TranslationMemoryExport|null
Parameters
- $translationMemoryId : int
- $exportId : string
Tags
Return values
TranslationMemoryExport|nullcheckImportStatus()
Check TM Import Status
public
checkImportStatus(int $translationMemoryId, string $importId) : TranslationMemoryImport|null
Parameters
- $translationMemoryId : int
- $importId : string
Tags
Return values
TranslationMemoryImport|nullclear()
Clear TM
public
clear(int $translationMemoryId) : mixed
Parameters
- $translationMemoryId : int
Tags
create()
Add TM
public
create(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
string $data[name]
Tags
delete()
Delete TM
public
delete(int $translationMemoryId) : mixed
Parameters
- $translationMemoryId : int
Tags
download()
Download TM
public
download(int $translationMemoryId, string $exportId) : DownloadFile|null
Parameters
- $translationMemoryId : int
- $exportId : string
Tags
Return values
DownloadFile|nullexport()
Export TM
public
export(int $translationMemoryId[, array<string|int, mixed> $params = [] ]) : TranslationMemoryExport|null
Parameters
- $translationMemoryId : int
- $params : array<string|int, mixed> = []
-
string $params[sourceLanguageId]
string $params[targetLanguageId]
string $params[format]
Tags
Return values
TranslationMemoryExport|nullget()
Get TM Info
public
get(int $translationMemoryId) : TranslationMemory|null
Parameters
- $translationMemoryId : int
Tags
Return values
TranslationMemory|nullimport()
Import TM
public
import(int $translationMemoryId, int $storageId[, bool $firstLineContainsHeader = false ][, array<string|int, mixed> $scheme = [] ]) : TranslationMemoryImport|null
Parameters
- $translationMemoryId : int
- $storageId : int
- $firstLineContainsHeader : bool = false
- $scheme : array<string|int, mixed> = []
Tags
Return values
TranslationMemoryImport|nulllist()
List TMs
public
list([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
-
integer $params[userId]
integer $params[groupId]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionupdate()
Edit TM Info
public
update(TranslationMemory $translationMemory) : TranslationMemory|null
Parameters
- $translationMemory : TranslationMemory