Translators in Translation Management Tool 7
Same name and namespace in other branches
- 8 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 167 - Hooks provided by the Translation Management module.
Functions
Name | Location | Description |
---|---|---|
hook_tmgmt_translator_plugin_info |
./ |
Provide information about translator plugins. |
hook_tmgmt_translator_plugin_info_alter |
./ |
Alter information about translator plugins. |
tmgmt_job_settings_custom_handling |
./ |
Determines if job settings of the translator will be handled by its plugin. |
tmgmt_provide_remote_languages_mappings |
./ |
Determines if the translator plugin supports remote language mappings. |
tmgmt_translator_access |
./ |
Access callback for the translator entity. |
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_create |
./ |
Creates a translator entity. |
tmgmt_translator_exists |
./ |
Checks whether a translator entity with the supplied name already exists. |
tmgmt_translator_labels |
./ |
Returns a list of all available translator labels. |
tmgmt_translator_labels_flagged |
./ |
Returns a list of flagged translator labels. If a translator is not available it will be suffixed with a short text explaining why it is not available. This can either be because the configuration of the passed job is not supported or because the… |
tmgmt_translator_load |
./ |
Loads a translator based on the name. |
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. |
tmgmt_translator_load_multiple |
./ |
Loads multiple translators based on their name. |
tmgmt_translator_plugin_controller |
./ |
Determines the controller class for a given service plugin. |
tmgmt_translator_plugin_info |
./ |
Determines all available service plugins. |
tmgmt_translator_plugin_labels |
./ |
Returns an array of all available translator plugins with the labels as values and the machine-readable name as the key. |
tmgmt_translator_ui_controller |
./ |
Get the ui controller class for a given translator plugin. |
Classes
Name | Location | Description |
---|---|---|
TMGMTDefaultTranslatorPluginController |
plugin/ |
Default controller class for service plugins. |
TMGMTDefaultTranslatorUIController |
plugin/ |
Default ui controller class for translator plugins. |
TMGMTTranslator |
entity/ |
Entity class for the tmgmt_translator entity. |
TMGMTTranslatorController |
controller/ |
Controller class for the job entity. |
Interfaces
Name | Location | Description |
---|---|---|
TMGMTTranslatorPluginControllerInterface |
plugin/ |
Interface for service plugin controllers. |
TMGMTTranslatorRejectDataItem |
plugin/ |
Handle reject on data item level. |
TMGMTTranslatorUIControllerInterface |
plugin/ |
Interface for translator ui controllers. |