MachineTranslationEngineApi
extends MachineTranslationEngineApi
in package
Machine Translation Engines (MTE) are the sources for pre-translations.
You can currently connect Google Translate, Microsoft Translator, DeepL Pro, Amazon Translate, and Watson (IBM) Translate engines. Use API to add, update, and delete specific MTE.
Table of Contents
Methods
- create() : MachineTranslationEngine|null
- Add MT
- delete() : mixed
- Delete MT
- get() : MachineTranslationEngine|null
- Get MT
- list() : ModelCollection
- List MTs
- translateViaMT() : MachineTranslation|null
- Translate via MT
- update() : MachineTranslationEngine|null
- Edit MT
Methods
create()
Add MT
public
create(array<string|int, mixed> $data) : MachineTranslationEngine|null
Parameters
- $data : array<string|int, mixed>
-
string $data[name] required
string $data[type] required
array $data[credentials] required
integer $data[groupId]
Tags
Return values
MachineTranslationEngine|nulldelete()
Delete MT
public
delete(int $mtId) : mixed
Parameters
- $mtId : int
Tags
get()
Get MT
public
get(int $mtId) : MachineTranslationEngine|null
Parameters
- $mtId : int
Tags
Return values
MachineTranslationEngine|nulllist()
List MTs
public
list([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
-
integer $params[groupId]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectiontranslateViaMT()
Translate via MT
public
translateViaMT(int $mtId, array<string|int, mixed> $data) : MachineTranslation|null
Parameters
- $mtId : int
- $data : array<string|int, mixed>
-
string $data[languageRecognitionProvider] Enum: "crowdin" "engine" Note: Is required if the source language is not selected
string $data[sourceLanguageId]
string $data[targetLanguageId] required
string[] $data[strings] Note: You can translate up to 100 strings at a time.
Tags
Return values
MachineTranslation|nullupdate()
Edit MT
public
update(MachineTranslationEngine $machineTranslationEngine) : MachineTranslationEngine|null
Parameters
- $machineTranslationEngine : MachineTranslationEngine