wv_deepltranslate
wv_deepltranslate copied to clipboard
[FEATURE] Add FlexForm field support
Is your feature request related to a problem? Please describe. Currently it is not possible to translate fields defined in FlexForms. In some cases, translation-relevant information is also located there. This case can occur in the context of grid elements that use FlexForms or plugins that expect text input in the plugin options like Powermail.
Describe the solution you'd like I would like to have the ability to configure which FlexForm field contents should be translated. This is currently only configurable at database table field level.
Describe alternatives you've considered
I have already tried setting $GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['l10n_mode'] = 'prefixLangTitle';
to have the FlexForm translated as a whole. However, this configuration does not seem to have any effect on the resulting texts.
As a plugin developer, the workaround is to migrate the FlexForm fields to database table fields to use the translation feature there as well.
Additional context
For example, I tried to translate the following flexform from English to German with the setting $GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['l10n_mode'] = 'prefixLangTitle';
. As a result, there was no discrepancy in the translated content at all in your extension.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3FlexForms>
<data>
<sheet index="sDEF">
<language index="lDEF">
<field index="subtitle">
<value index="vDEF"></value>
</field>
<field index="text">
<value index="vDEF">Soak up the atmosphere of a unique hystorical site.</value>
</field>
<field index="button_text">
<value index="vDEF">About the Resort</value>
</field>
<field index="color">
<value index="vDEF">light</value>
</field>
<field index="link">
<value index="vDEF">t3://page?uid=296438</value>
</field>
</language>
</sheet>
</data>
</T3FlexForms>
In contrast, if I enter the same FlexForm directly in the DeepL app, both the content and the attributes are translated. The latter would affect the functionality and is a reason that the scope would really need to be on the content of the individual FlexForm fields to meet the requirement.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3FlexForms>
<Daten>
<Blatt index="sDEF">
<Sprache index="lDEF">
<feld index="untertitel">
<value index="vDEF"></value>
</field>
<feld index="text">
<value index="vDEF">Saugen Sie die Atmosphäre eines einzigartigen hystorischen Ortes auf.</value>
</field>
<field index="button_text">
<value index="vDEF">Über das Resort</value>
</field>
<field index="color">
<value index="vDEF">Hell</value>
</field>
<feld index="link">
<value index="vDEF">t3://page?uid=296438</value>
</field>
</language>
</sheet>
</data>
</T3FlexForms>