transOrigPointerField

transOrigPointerField
Type
string (field name)
Path
$GLOBALS['TCA'][$table]['ctrl']
Scope
Proc. / Display

Changed in version 13.3

Name of the column, by convention l10n_parent, used by translations to point back to the original record, the record in the default language of which they are a translation.

If this value is found being set together with the languageField then the FormEngine will show the default translation value under the fields in the main form. This is very neat if translators are to see what they are translating.

The column definition is auto-created. If it is overridden it must still be of type Pass through / virtual field.

Example: Define a translation origin

EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_something.php
<?php

return [
    'ctrl' => [
        'transOrigPointerField' => 'l10n_parent',
        'transOrigDiffSourceField' => 'l10n_diffsource',
        'languageField' => 'sys_language_uid',
        'translationSource' => 'l10n_source',
        // ...
    ],
    'palettes' => [
        'language' => [
            'showitem' => '
                sys_language_uid,l10n_parent,
            ',
        ],
    ],
    'types' => [
        0 => [
            'showitem' => '
                --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
                    [...],
                --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
                    --palette--;;language,
            ',
        ],
    ],
];
Copied!