Translators in Translation Management Tool 8
Same name and namespace in other branches
- 7 tmgmt.api.php \tmgmt_translator
A translator plugin integrates a translation service.
To define a translator, hook_tmgmt_translator_plugin_info() needs to be implemented and a controller class (specified in the info) created.
A translator plugin is then responsible for sending out a translation job and storing the translated texts back into the job and marking it as needs review once it's finished.
TBD.
File
- ./
tmgmt.api.php, line 124 - Hooks provided by the Translation Management module.
Functions
Name | Location | Description |
---|---|---|
hook_tmgmt_translator_plugin_info_alter |
./ |
Alter information about translator plugins. |
tmgmt_translator_auto_create |
./ |
Auto creates a translator from a translator plugin definition. |
tmgmt_translator_busy |
./ |
Checks whether a translator with a certain name is busy and therefore can't be modified or deleted. A translator is considered 'busy' if there are jobs attached to it that are in an active state. |
tmgmt_translator_labels |
./ |
Returns a list of all available translator labels. |
tmgmt_translator_labels_flagged |
./ |
Returns a list of flagged translator labels. |
tmgmt_translator_load_available |
./ |
Loads all translators that are available and, if a translation job is given, support translations for that job with its current configuration. |
Classes
Name | Location | Description |
---|---|---|
Translator |
src/ |
Entity class for the tmgmt_translator entity. |
TranslatorAccessControlHandler |
src/ |
Access control handler for the translator entity. |
TranslatorForm |
src/ |
Form controller for the translator edit forms. |
TranslatorPluginBase |
src/ |
Default controller class for service plugins. |
TranslatorPluginUiBase |
src/ |
Default ui controller class for translator plugins. |
Interfaces
Name | Location | Description |
---|---|---|
ContinuousTranslatorInterface |
src/ |
Interface for continuous translators. |
TranslatorInterface |
src/ |
Interface for the tmgmt_translator entity. |
TranslatorPluginInterface |
src/ |
Interface for service plugin controllers. |
TranslatorPluginUiInterface |
src/ |
Interface for translator ui controllers. |
TranslatorRejectDataInterface |
src/ |
Handle reject on data item level. |