transOrigPointerField¶
-
transOrigPointerField
¶ -
- Type
- string (field name)
- Path
- $GLOBALS['TCA'][$table]['ctrl']
- Scope
- Proc. / Display
Changed in version 13.3
The column definition is auto-created.
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.
Note
Sometimes
l18n_parent
is used for this field in Core tables. This is for historic reasons.Warning
Columns created automatically by being defined by this property still need to be added manually to the palettes and types definition.
Due to the TCA loading order these columns are only created if the according ctrl property was added in the original definition in
Configuration/TCA/<tablename>.php
, not if they were defined in the overrides likeConfiguration/TCA/Overrides/something.php
.
Example: Define a translation origin¶
<?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,
',
],
],
];