CTSX Instant Translation
Edition |
Incubator (services) |
||
Issues |
|||
Git |
|||
Latest |
3.4.12
|
The CTSX Instant Translation module adds option (functionality) for instant translation of page/area/component.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
| In order to be able to use instant translation actions, please make sure that the core and apps modules in the Content Translation Extended have already been installed. |
<dependency>
<groupId>info.magnolia.translation</groupId>
<artifactId>magnolia-content-translation-support-ext-instant</artifactId>
<version>3.4.12</version>
</dependency>
Configuration
There is no need of extra configuration for this module to function properly. The only thing that this module requires is setting a default translator (defaultFlag set to "true").
Instant translation actions in the magnolia’s action bar will be shown automatically (no need of extra configuration).
| Please note that "instant translation actions" in magnolia’s action bar, translate the component/area/page and save translated content in the JCR. |
In case there is no need to save translated content in JCR automatically, you can configure "instant translation action" on dialog level.
To add "instant translation" secondary action to dialog definition you need to update, dialog’s actions definitions:
commit: $type: commitAction cancel: $type: closeAction instantTranslation: name: instantTranslation $type: instantTranslationDialogAction label: "Instant translation"
and also dialog’s footer layout definition:
$type: defaultEditorActionLayout primaryActions: - commit - cancel secondaryActions: - localeSelector - instantTranslation
So dialog definition should look like this:
form:
properties:
headlineLevel:
$type: comboBoxField
defaultValue: small
datasource:
$type: optionListDatasource
options:
- name: big
value: big
- name: medium
value: medium
- name: small
value: small
headline:
$type: textField
i18n: true
text:
class: info.magnolia.dam.app.field.DamRichTextFieldDefinition
i18n: true
image:
$type: damLinkField
imagePosition:
$type: comboBoxField
defaultValue: below
datasource:
$type: optionListDatasource
options:
- name: above
value: above
- name: below
value: below
imageAltText:
$type: textField
i18n: true
imageTitle:
$type: textField
i18n: true
imageCaption:
$type: textField
i18n: true
imageCredit:
$type: textField
i18n: true
layout:
$type: tabbedLayout
tabs:
- name: tabText
fields:
- name: headlineLevel
- name: headline
- name: text
- name: tabImage
fields:
- name: image
- name: imagePosition
- name: imageAltText
- name: imageTitle
- name: imageCaption
- name: imageCredit
actions:
commit:
$type: commitAction
cancel:
$type: closeAction
instantTranslation:
name: instantTranslation
$type: instantTranslationDialogAction
label: "Instant translation"
footerLayout:
$type: defaultEditorActionLayout
primaryActions:
- commit
- cancel
secondaryActions:
- localeSelector
- instantTranslation