You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/multisite/languages/automated_translations.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ description: With the automated translation add-on, users can translate content
4
4
5
5
# Automated content translation
6
6
7
-
The automated translation add-on package allows users have content items machine-translated into multiple languages by using either Google Translate or DeepL external translation engine.
7
+
With the automated translation add-on package, users can translate their content items into multiple languages automatically by using either Google Translate or DeepL external translation engine.
8
8
The package integrates with [[= product_name =]], and allows users to [request from the UI]([[= user_doc =]]/content_management/translate_content.md#add-translations) that a content item is translated.
9
-
However, you can also run an Console Command to translate a specific content item.
9
+
However, you can also run a Console Command to translate a specific content item.
10
10
Either way, as a result, a new version of the content item is created.
11
11
12
12
The following field types are supported out of the box:
@@ -16,13 +16,13 @@ The following field types are supported out of the box:
16
16
-[RichText](richtextfield.md)
17
17
-[Page](pagefield.md): the content of `text` and `richtext`[block attributes](page_block_attributes.md#block-attribute-types)
18
18
19
-
See [adding a custom field or block attribute encoder](##add-a-custom-field-encoder) for more information how you can extend this list.
19
+
See [adding a custom field or block attribute encoder](##add-a-custom-field-encoder) for more information on how you can extend this list.
20
20
21
21
## Configure automated content translation
22
22
23
23
### Install package
24
24
25
-
Automated content translation support comes as an additional package that you must download and install separately:
25
+
The automated content translation feature comes as an additional package that you must download and install separately:
Before you can start using the feature you must configure access to your Google and/or DeepL account.
49
+
Before you can start using the feature, you must configure access to your Google and/or DeepL account.
50
50
51
51
1\. Get the [Google API key](https://developers.google.com/maps/documentation/javascript/get-api-key) and/or [DeepL Pro key](https://support.deepl.com/hc/en-us/articles/360020695820-API-Key-for-DeepL-s-API).
52
52
@@ -76,7 +76,7 @@ The following arguments and options are supported:
76
76
- `contentId`- ID of the content to translate
77
77
- `serviceName`- the service to use for translation
78
78
79
-
For example, to translate the root content item from the English translation into French with the help of Google Translate, run:
79
+
For example, to translate the root content item from English to French with the help of Google Translate, run:
80
80
81
81
``` bash
82
82
php bin/console ibexa:automated:translate --from=eng-GB --to=fre-FR 52 google
@@ -130,15 +130,16 @@ The following example adds support for automatically translating alternative tex
130
130
```
131
131
In this example, the methods are responsible for:
132
132
133
-
- `canEncode`- deciding if the field to be encoded is an [Image](imagefield.md) field
134
-
- `canDecode`- deciding if the field to be decoded is an [Image](imagefield.md) field
133
+
- `canEncode`- deciding whether the field to be encoded is an [Image](imagefield.md) field
134
+
- `canDecode`- deciding whether the field to be decoded is an [Image](imagefield.md) field
135
135
- `encode`- extracting the alternative text from the field type
136
136
- `decode`- saving the translated alternative text in the field type's value object
137
137
138
-
2\. Register it as a service. If you're not using [Symfony's autoconfiguration]([[= symfony_doc =]]/service_container.html#the-autoconfigure-option), use the `ibexa.automated_translation.field_encoder` service tag.
138
+
2\. Register the class as a service.
139
+
If you're not using [Symfony's autoconfiguration]([[= symfony_doc =]]/service_container.html#the-autoconfigure-option), use the `ibexa.automated_translation.field_encoder` service tag.
For custom block attributes the appropriate interface is [`BlockAttributeEncoderInterface`](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-AutomatedTranslation-Encoder-BlockAttribute-BlockAttributeEncoderInterface.html) and the service tag is `ibexa.automated_translation.block_attribute_encoder`.
145
+
For custom block attributes, the appropriate interface is [`BlockAttributeEncoderInterface`](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-AutomatedTranslation-Encoder-BlockAttribute-BlockAttributeEncoderInterface.html) and the service tag is `ibexa.automated_translation.block_attribute_encoder`.
0 commit comments